You can use an External ID in place of a related record's Salesforce record ID to relate or associate records to each other as you process an Upsert operation in Data Loader.
For example, if an Object (B) has a lookup field to another Object (A) you can use the values contained in a field that's marked as an External ID on Object A to relate the two (Object B to Object A records). See Can I import using external IDs? for additional details on what an External ID field is and its intended use.
When performing the Upsert with Salesforce Data Loader, here are a few considerations:
How to Update Records Using the External ID Using Data Loader
Similar to Salesforce record IDs, when a field is marked as an External ID, its values can be used to match and associate related records to one another. External IDs are commonly used to store unique record identifiers from external systems and allow for routinely loading data into Salesforce without having to prepare your import file with existing or related Salesforce record IDs each time.
1. Identify an existing External ID field on Object A that you'd like to use for matching (or create an External ID via a new custom field with the Data Type "Text" on Object A) and select the External ID and Unique field attributes.
Note: For more details on creating an external Id, see these related help articles: Create Custom Fields and Custom Field Attributes.
2. Populate the External Id field on related (Object A, in our example) records in Salesforce:
If the related Object (A) records already exist in Salesforce:
- Ensure the External ID field is populated with unique values so you can easily use it as matching criteria to relate records later on.
If your external Id field is not populated on existing records, you can mass update them with desired values:
A) Create a .CSV file containing all Object A records by either Building a Report and Exporting a Report or by using the Data Loader to Export Data.
Note: Be sure to include the Salesforce IDs for Object A records in your report or export file.
B) Populate your resulting export with the desired unique values for the External Id field and then perform an update to the existing records by mapping Salesforce ID and your External Id field.
If the related object (A) records don't already exist in Salesforce:
Identify a column that contains data that would serve as a unique identifier for Object A records and map it to the External ID field you identified or created in Step 1 when inserting the records. Ideally, the unique values you choose to map from your Object A import file would already be contained in your Object B import file and/or commonly contained in files from an external system.
3. Perform an Insert for new records or perform an Update for existing records to Object A. Map required fields and the External ID column to the External ID field on Object A's records from step 1 (be sure to include and map Salesforce ID for an update or upsert operation) to populate a unique External ID value in Salesforce for all of Object A's records.
For more details, see this related help article: Insert, Update, or Delete Data Using Data Loader
4. Prepare your Object B file with the related Object A record's corresponding External ID values you'd like to use for matching in order to populate the lookup field from Object B to Object A using the following method:
5. In Data Loader:
a. Click Upsert.
b. Select the appropriate object (Object B in our example).
c. Click Browse.
d. Select your import file for Object B.
e. Click Next.
6. In Step 2: 'choose your related objects' select the External ID field for the Object A drop-down to use the External ID field for matching related Object A records upon importing Object B records.
7. In step 3: 'mapping' drag and drop the Salesforce field with the name syntax [ObjectName]:[ExternalIDField__c] to map it to your Object B file's column containing the External ID values for Object A's records (in our example, the naming syntax [ObjectName] is "Object A" and [ExternalIDField__c] is the API name of object A's External Id field from step 1).
Auto-Number not available as external ID in Data Loader
Differences between the 'External ID' field and the 'Unique ID' field setting
000383207

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.