Quick win 14. External Data source (OData service) in Salesforce and in flow

Itsmem0h1t
3 min readAug 10, 2022

Objective: The idea of this post is to demonstrate how you can easily setup and access external data source in Salesforce using Salesforce Connect product.

Benefit of this integration approach is that you can visualize the external data in salesforce without any custom development effort on Salesforce side to build the integration

What is Salesforce Connect: Salesforce Connect lets you seamlessly access data from legacy systems such as SAP, Microsoft and Oracle in real time, without making a copy of the data in Salesforce.

Small note:

underthehood External data source brings associated external objects which the Salesforce platform uses to interact with the external data and content

How to setup :

Step 1 is

  • To create a new External Data source in Salesforce , Setup → External Data sources
  • For this, first you need to define the connection type (e.g. in this case oData 2.0) and service url http://odata.herokuapp.com/sap/
  • This is how the odata service looks like when viewed in browser
  • Next step is to click on “validate and Sync” to create the external object structure
  • In order to view the external data, you can create a new custom tab for the object and access the records from object’s listview (e.g. orders)
  • Also you can convert the relationship on field Businesspartnerid__c on Sales Order object from text to → indirect lookup (to Account) in order to link external object with a salesforce internal Object

Step 2: Create a new screen flow to be able to read / update the data in external system directly from Salesforce. The benefit here is that you can even write on the external data from Salesforce directly if the data source is writable.

  • Create a basic screen flow you as you would like with a screen element and GET Records and Update element, the key thing to remember is you can GET, or Update modifications on the external data source
  • Save the flow and add it to the account record and after adding this is how flow on screen will look like:
  • You can view the data, update the values and click on finish to update the external data source
  • Also, in case you like to see theSales order (external data) on account, you can add the related list on account object and you can visualize the data

You can also learn from trailhead

Summary : the gist of this article is that you can utilize the external objects in your flow in salesforce and can use it to create / update data in external system without logging to the external system

Thanks & Cheers Mohit

--

--