In Salesforce, data migration involves moving records from one Salesforce organization (source org) to another Salesforce organization (target org). Before beginning a migration, ensure that the target org is properly configured with the required metadata, customizations, and users.
You can migrate data by importing or inserting records from a legacy Salesforce organization or another external source into a target organization. To preserve record relationships, it is important to import object data in the appropriate order.
Record relationships in Salesforce are maintained through unique record IDs rather than record names. As part of the migration process, you must replace legacy record IDs in your import files with the corresponding newly generated record IDs from the target org to ensure related records remain correctly associated.
The following steps explain how to prepare your target Salesforce org, select an appropriate data import method, and maintain record relationships throughout the migration process.
Support is available for specific questions or issues that may arise during your migration. However, overall migration planning, project scoping, implementation, execution, and required data manipulation activities are outside the scope of Salesforce Support and Admin Assist services.
Migration planning, testing, and validation should be performed by the customer. If additional assistance is required, contact your Account Executive to discuss Professional Services options or engage a Salesforce Consulting Partner. Please note that these services may incur additional costs.
Before migrating data, prepare the target org to receive imported records. Consider the following:
Ensure matching metadata exists in the target org.
Experienced administrators or developers can migrate metadata using deployment tools such as the Ant Migration Tool.
Configure required customizations, including record types, page layouts, validation rules, and automation.
Develop sharing models as needed, including Profiles, Roles, Permission Sets, and Sharing Rules.
Review ownership and access requirements.
Verify that all required fields and data points from the source org are available in the target org.
Test the migration process in a sandbox environment before performing the production migration.
Validate imported data after migration is complete.
Several tools are available for importing data into Salesforce, depending on your Salesforce edition and the volume of records being migrated. Review the Choosing a Method for Importing Data documentation to determine the most suitable option.
When importing records from one Salesforce org to another, records should be imported in a logical sequence so that relationships can be re-established.
Because Salesforce stores relationships using record IDs, legacy IDs must be replaced with the newly generated IDs from the target org. A common approach is to use Excel's VLOOKUP function to match source record IDs with target record IDs and update import files accordingly.
If using VLOOKUP is not practical, consider creating a custom External ID field and populating it with the source org's record IDs or another unique identifier. This allows related records to be imported using External ID relationships.
For example, after importing Account records into the target org, replace all legacy Account IDs referenced in related object import files with the newly created Account IDs before importing Contacts, Opportunities, Cases, and other related records.
The Salesforce Data Model documentation can help identify object relationships and assist with planning the appropriate import sequence.
Accounts
Campaigns
Contacts
Opportunities
Cases
Price Books
Products
Leads
Contracts
Related Chatter Feed data must also be reinserted and associated with the appropriate records after migration.
Choosing a Method for Importing Data
Best Practices When You Migrate Data
Sandboxes: Staging Environments for Customizing and Testing
Deploying and Retrieving Metadata (Ant Migration Tool)
Salesforce Data Model | SOAP API Developer Guide
000384648

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.