How to Create an External ID in Salesforce?

I’m working as a Salesforce system admin for an organization that manages customer data using both Salesforce and an external ERP (Enterprise Resource Planning) system. We use Salesforce for sales and customer interactions, while the ERP system is used for inventory, billing, and order management.

We need to ensure that customer information in Salesforce matches the correct customer information in its ERP system. Even if the customer details were entered separately in both systems, a way needs to connect the right records together.

As a solution for this, I created a custom external ID for the Account and marked it as an External ID. This field will store the unique customer ID from the ERP system.

Now, I will explain the external ID in Salesforce and how to create an External ID field.

What are External IDs in Salesforce?

In Salesforce, an External ID is a custom or standard field that holds unique identifiers from external systems, such as an ERP or a third-party application. It serves as a link between Salesforce records and corresponding records in external systems, facilitating efficient data exchange between your Salesforce org and the external system.

Supported Field Types for External ID fields in Salesforce

Salesforce allows certain field types to be assigned as an External ID, ensuring they can identify a record not only in Salesforce but also in external systems.

  • Text: A simple text field can serve as an External ID. Ensure that the values in this field are unique and consistent with the external system’s identifiers.
  • Email: An email address field can be an External ID, ensuring that every record is associated with a unique email address.
  • Number: Numeric fields can be External IDs, but they should not contain fractional values when representing unique identifiers.
  • Auto Number: This is a system-generated sequence number that automatically increments with each new record. Due to its unique nature, it can also serve as an External ID.

Use of External ID in Salesforce

External IDs in Salesforce are created to extend the field’s reach beyond the Salesforce platform. When an External ID is assigned to a record, it is often configured with the ‘Unique ID’ setting. This ensures that each External ID remains unique not only within Salesforce but also across external systems or applications that are integrated with Salesforce.

External IDs’ primary purpose is to facilitate seamless data integration between Salesforce and external systems. By mapping records based on the External ID, organizations can exchange data efficiently and maintain consistency across different platforms.

Create an External ID field in Salesforce

To create an External ID field in a Salesforce object, navigate to the Salesforce lightning setup page and follow the steps below.

1. On the Salesforce Lightning’s setup page, click on the Object Manager tab.

2. In the object manager tab, select the object in which you create the External ID field. In this example, I will create the field in the Account object.

3. In the object’s setup, click on Fields and Relationships, and then in the next window, click on the New button.

External id in Salesforce Lightning

4. In this step, we have to select the data type of the record field. The external ID supports only the data types Text, Email, Number, Auto Number, and Text encrypted.

For the current scenario, I have selected the Number field.

5. Enter the Field Label, and the Field Name will be auto-filled according to the entered label. Select the length for the number field.

Activate the checkbox External Id and click on the Next button.

Use external id in Salesforce

6. Select the profiles that can view and edit the custom field. To select all profiles, activate the Visible checkbox. After this, click on the Next button.

Salesforce external ID field

7. Activate the checkboxes of the page layouts on which you have to make this field visible to the users.

At last, click on the Save button.

Create External ID field in Salesforce

The custom external ID field will be visible on the selected page layouts. This field can be used to link records between Salesforce and an external system.

External Id field in Salesforce

This way, we can create an external ID field in Salesforce by following the above steps and integrating the fields in your Salesforce org with external resources.

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.