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.

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.

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.

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.

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.

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:
- How to Create Text Field Salesforce
- How to Create Date Field Type in Salesforce
- How to Create Auto Number Field Type in Salesforce
- Edit Fields Inline on the Reports in Salesforce
- How to Setup External Objects in Salesforce?
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.