Data migration · External IDs

Every row in the extract points at its parent by an ID Salesforce has never heard of. Store that ID on the parent as an External ID and the children find their way home on their own. No VLOOKUP between loads.

1 checkboxExternal ID on a text field
0 VLOOKUPsbetween parent and child loads
Indexedautomatically, for faster matching
4‑minute videoThe full walkthrough
On this page
  1. The problem
  2. What the checkbox does
  3. 1 · Create the field
  4. 2 · Load parents
  5. 3 · Load children
  6. Troubleshooting
  7. Gotchas and FAQ
Watch on YouTube ↗
The problem

The old IDs are the bridge.

Every child record in the extract points at its parent by the old system’s ID. Keep that ID on the parent in Salesforce, mark it External ID, and children can find their parents with no VLOOKUP.

Without it, every load goes: insert parents, paste the success file into Excel, VLOOKUP the new IDs into the child file, insert children, repeat. With it you also get traceability (which old record became which new one), reconciliation (did everything make it?), and a way back to the source long after go-live.

Prefer to read? Everything in the video is written out below.

What the checkbox does

External ID vs a plain text field.

Same field type. Three differences that matter in a migration.

Plain text fieldExternal ID
Lookup key in Data LoaderNoYes: children can reference the parent by it, and upsert can match on it
IndexedNoYes, automatically: faster matching on big loads
Global searchNot alwaysYes: paste an old ID, find the record

Tick Unique too if the source guarantees one ID per record. It stops the same legacy ID landing on two records.

Step 1

Create the Legacy ID field.

One per object you’re migrating, created before the first load.

  1. Object Manager → the object (e.g. Account) → Fields & Relationships → New → Text.
  2. Label it Legacy ID (API name Legacy_ID__c). Use the same name on every object.
  3. Make it long enough for the longest source ID. A Dynamics GUID is 36 characters.
  4. Tick External ID, and Unique if it applies.
  5. Set field-level security and add it to the layouts.
Salesforce field setup with the External ID checkbox selected
The External ID checkbox on a new text field.
Step 2

Load parents with their old IDs.

Map the source ID column to Legacy_ID__c on the parent load.

Example: a Dynamics migration. Insert Accounts and map the Dynamics account ID to Account.Legacy_ID__c. The Account load post has the rest of that load. The success file now pairs each new Salesforce ID with the legacy ID you gave it. Keep it.

Data Loader success file pairing new Salesforce IDs with Legacy_Id__c values
Success file: new ID beside the old one.
Step 3

Load children by the parent’s old ID.

The Contact file still has the Dynamics account ID. Point Data Loader at Account.Legacy_ID__c and it finds the right Account.

In the Data Loader mapping, map the child’s parent column to the parent’s external ID instead of its Salesforce ID. For Contacts that’s Account:Legacy_ID__c (on an upsert, Data Loader asks for it on its own screen). Data Loader looks up the Account by that value and fills in AccountId for you.

No VLOOKUP step between loads. Your child files keep the source system’s IDs all the way through, which means fewer hand-edited files and fewer contacts on the wrong account. Headers that are API names make the mapping quick.

Troubleshooting

When it doesn’t match.

SymptomCheck
Children on the wrong parent, or noneThe lookup is mapped to the parent’s External ID, not its Salesforce ID. Legacy IDs have no extra spaces
Lookup matches failParents loaded first, with Legacy ID filled. Case, hyphens and leading zeros match the CSV
Duplicate errorsThe source has repeated IDs. Remove them, or don’t tick Unique if repeats are legitimate
Field not in Data LoaderExternal ID is ticked, field-level security allows it, and you logged out and back into Data Loader
Slow loadsSplit very large files into smaller batches
Gotchas

The questions people ask.

Why keep legacy IDs at all?
Traceability, reconciliation, and loading children against their parents without VLOOKUPs.
How long should the field be?
At least as long as the longest source ID. Check the source rather than guessing: GUIDs are 36 characters.
Should I tick Unique?
If the source guarantees one ID per record, yes. It catches accidental double loads.
Can I use it to upsert later?
Yes. Upsert can match on any External ID, which makes delta loads and fixes after go-live much easier.
Any naming advice?
Use the same API name on every object, e.g. Legacy_ID__c. Your mappings and formulas stay the same.
Data Migration Masterclass

This is how every load connects.

The Masterclass walks through the whole migration in load order, with legacy IDs carrying each relationship from Accounts down to activities.

Know someone still VLOOKUP-ing IDs between loads?

Share on LinkedIn
Doing this for a whole org, not just one object?

One CSV is a tutorial. Forty objects, 15 years of history and a go-live date is a project. That’s the part I do for a living.

See how I run migrations →