
The first step is to make sure you choose UPSERT and not INSERT. Now we can use DataLoader to load the data. Now we want to load data using a CSV file into the transaction object, and use the external ids for the Account and Product. We have an account record with an Account Code defined:Īnd also a product record with an External Product Code:

The Product object also has an external id defined, Product Code. The Account object has an external id defined – Account Code. Account and Product are lookups to their respective objects. The object has 4 fields, Account, Product, Transaction Amount and Transaction Date. Lets look at a case where we have an object that stores Customer Transactions, and it is loaded with data from an external system. This makes loading data much simpler, than having to supply the salesforce ids for each lookup field.

When using DataLoader or another integration tool to update data, the external id can be used instead of the Salesforce id to uniquely identify records.Įxternal Ids can also be used when you need to load data into an object that has lookups, and the objects that the looksups are associated with have external ids defined. External Ids provide a convenient way to integrate data from an external system, by allowing the use of a unique record identifer for records instead of the Salesforce Id.įor example, you may define an Account Code external id on the Account object, which is the unique key for an account record in an ERP system that is integrated with Salesforce.
