Object load sequence and relationship preservation for manufacturing data
Key Takeaway
Load parent records first. Before you load a related object's import file, replace every legacy parent ID in that file with the parent's new target ID.
Data migration moves records from a source org or an outside system into a target Salesforce org. Salesforce links records by unique record IDs, not by names. Every record you load gets a new ID in the target org. So two things decide whether accounts, products, sales agreements, forecasts, and visits stay connected after the move: the order you load objects in, and how you carry legacy IDs forward.
Relationships use record IDs
Salesforce stores a relationship between two records as a record ID, not as a record name. Each record you load into the target org gets a new ID there.
A related object's import file still holds the legacy IDs of its parent records from the source org. Those legacy IDs don't match the new IDs the parents got in the target org. So before you load a related object's file, replace every legacy parent ID in it with the parent's new target ID.
Parent records must load first, because their new target IDs don't exist until they load.
Your source org has an account for Ridgeline Castings with 12 sales agreements. You load Accounts first, and Ridgeline Castings gets a new ID in the target org. The Sales Agreement import file still shows the legacy Ridgeline Castings ID in all 12 rows. You replace that legacy ID with the new target ID in each row. Then you load the file, and all 12 agreements link to the Ridgeline Castings account in the target org.