function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Deepika GhoseDeepika Ghose 

External ID use in data migration

What is the problem we will face if we dont use external id while using data migration
When importing custom objects, solutions, or person accounts, you can use external IDs to prevent duplicate records from being created as a result of the import operation.
An external ID is a custom field that has the “External ID” attribute, meaning that it contains unique record identifiers from a system outside of Salesforce. When you select this option, the import wizard will detect existing records in Salesforce that have the same external ID. Note that this operation is not case-sensitive - for example, “ABC” will be matched with “abc”. However, there is an exception: if the custom field has the separate “Unique” attribute and the case-sensitive option for that attribute is selected, uppercase and lowercase letters will not be considered identical. For more information, see Custom Field Attributes.

It is used for Loading Data from external System and Data Integration..


When you are doing data migration, you have to have an order in which your data has to be migrated. To link the related account in the old system to the same relationships in Salesforce, the external ID helps. However, you do not necessarily have to mark the field as External ID to do the migration. External ID helps you mark it as unique field and can help you to avoid dupicate inserts.

For example, if you are migrating Account and Contracts from an old system, you will have to move the Account first  to the Salesfrce. This is because you need the parent records in order to insert the child records. 

1. Export Accounts from the old system. LIst contains the unique reference ID from the old system.
2. Insert the Accounts in Salesforce keeping Unique reference as a field marked as an external ID (and check the box that it is unique). It generates the Salesforce IDs for the new records. 
3.  Now you have a list of Salesforce Accounts with Salesforce IDs and their external IDs.
4. Export the Contracts from the old system. This list will contain their unique reference from the old system and their parent record (Account IDs) ids from the old system.
5. To upload the contracts to Salesforce, you need to specify the Salesforce ID of the account. This mapping you can do by using the External ID in the list you have in the step 3. Do a VLOOKUP between the list in the step 4 and 3 to map the Salesfoce ID for the Children Record.
6. Upload the contracts to salesforce including the Salesforce IDs of the Account records.

I hope this helps.