How to Setup External Objects in Salesforce?

In Salesforce, External objects are similar to custom objects, and these external objects allow us to access and interact with data stored outside of the Salesforce organization.

This means the external data can be viewed and managed within the organization as native Salesforce data.

In this Salesforce tutorial, I will explain external objects in Salesforce and how to set up external objects in Salesforce.

What are External Objects in Salesforce?

In Salesforce, External objects are available for API versions 32.0 and later. External objects are similar to custom objects, but the data of external objects is stored outside our Salesforce org. Each org can have up to 200 external objects.

Suppose the data you want to access is stored in the external system. Instead of importing this data into Salesforce, you can use external objects to access it in real-time through web service callouts.

These external objects are mapped to the data stored in the external system, enabling integration without importing data into Salesforce. By defining external data sources, organizations can utilize real-time data from systems such as databases, ERP systems, or content management platforms directly within Salesforce. This ensures that users have access to the updated information.

Set up External Objects in Salesforce

To set external objects in Salesforce, we must define external data sources. Then, we need to validate the data source and create an external Salesforce object with the embedded data source.

Create External Data Sources in Salesforce

To create an external data source in Salesforce, navigate to the setup page and follow the steps below.

  1. On the setup, go to Quick Find and search, then select External Data Sources.
  1. In the setup of External Data Sources, click on the New External Data Source button.
    • Enter the external data source name, and its Name will be auto-filled. Select the type of external source. In this example, I have selected the type “Salesforce Connect: OData 2.0“.
Salesforce External data sources
  1. In the URL, enter the URL link of the external data source. I have used the URL “https://orderdb.herokuapp.com/orders.sv“.
    • After this, leave the other fields with their default values and click Save.
    • In the next window, click on the Validate and Sync button.
Validate external data source in Salesforce
  1. Select the columns from the source data table; for example, I have selected the Order and OrderDetail tables. After this, click on the Sync button.
Create data source for external object in Salesforce

With this, we have created and validated the external data source that we will use to access the external Salesforce object.

Create an External Object in Salesforce

After validating the external data resource, we will create an external object. To create an external object in your org, navigate to Salesforce’s setup page and follow the steps below.

  1. On the setup page, go to the Quick Find box and search, then select “External Objects.”
Create External objects in Salesforce
  1. In the External Object setup window, click on the New External Object.
    • In this step, enter the required details, such as Label and Plural Label. The Object Name field is a unique identifier that refers to this external object when using the API.
Salesforce External Object setup
  1. In the External Data Source field, we must enter the external data source that contains the connection details we want to use for this external object. For this, select the data source that we have created.
    • After this, enter the Table Name, select the optional settings, and then select the Deployed radio button to deploy the external object. Click Save.
Connect External object with external data source in Salesforce

As we click on the Save button, the external object will be created and deployed.

Deploy External object in Salesforce

This way, we can create and set up external objects in Salesforce by following the above steps.

Conclusion

In this Salesforce tutorial, we have learned to create external data sources and external objects, and with this, we can efficiently integrate the external data within our Salesforce environment, making it accessible to the users while ensuring it remains updated.

While creating the data sources, ensure that the URL used for the external system provides a compatible API for Salesforce Connect. 

You may also like to read:

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.