SF-Data-Arch Data Migration Practice Question
A multinational corporation is migrating 2 million Account records and 5 million Contact records from a legacy CRM into Salesforce. The legacy system stores the Account's legacy ID on the Contact record as a foreign key. The target Salesforce org uses an external ID field on Account called Legacy_ID__c. What is the most efficient way to associate Contacts with their Accounts during the migration?
⚠ Common exam trap
The trap here is thinking that you need to migrate Contacts first or use custom code to establish relationships, when Salesforce natively supports populating lookups via external IDs.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Migrate Accounts first, then migrate Contacts with a lookup to Account using the Legacy_ID__c field as the external ID in the Account relationship field.
Migrating Accounts first and then using the external ID field Legacy_ID__c in the Contact's Account lookup field allows Salesforce to automatically resolve the relationship. This is the most efficient method because it leverages built-in external ID resolution during data load, eliminating the need for post-migration updates or complex Apex jobs. It ensures referential integrity and scales well for large data volumes.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Migrate Contacts first with a placeholder Account, then migrate Accounts and update Contacts via a batch Apex job.
Why it's wrong here
Migrating Contacts first requires a placeholder Account, which may violate validation rules or create unnecessary data. Then updating 5 million Contacts via batch Apex is resource-intensive and subject to governor limits. This approach is inefficient and error-prone compared to using external IDs directly during the initial load.
- ✗
Export the Salesforce Account record IDs after migration, then use those IDs to update the Contact records in the legacy system before migrating Contacts.
Why it's wrong here
This requires modifying the legacy system and performing an additional export/import cycle, which is time-consuming and risky. It also assumes you can update the legacy system, which may not be possible. Using external IDs during the Contact load is simpler and avoids unnecessary steps.
- ✗
Use the Data Loader's 'Insert' operation for Contacts and rely on Salesforce's auto-association feature to link Contacts to Accounts based on matching names.
Why it's wrong here
Salesforce does not have an auto-association feature that links Contacts to Accounts based on names during data load. This would result in Contacts without Account relationships or incorrect associations. Manual matching would be required, which is not feasible for 5 million records. The external ID approach is the correct method.
- ✓
Migrate Accounts first, then migrate Contacts with a lookup to Account using the Legacy_ID__c field as the external ID in the Account relationship field.
Why this is correct
This is correct because Salesforce allows you to populate a lookup relationship using an external ID field. After Accounts are migrated, Contacts can be loaded with the Account's legacy ID in the Account lookup field, and Salesforce will resolve it to the correct Account record. This avoids the need for a second pass or manual mapping and is efficient for large volumes.
Visual reference
About these practice questions
Courseiva writes every SF-Data-Arch question from scratch — 222 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Salesforce exam blueprint
This SF-Data-Arch practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SF-Data-Arch exam.