How to do Data Migration in Salesforce?

It’s possible to migrate data from an external source or from a legacy Salesforce source organization into a different target organization by inserting or importing records from the prior.

So how to do that? And what’s the process you have to go through to migrate data? We are going to discuss all about salesforce data migration in this article.

Before Getting Started

There is support available for directed or specific queries that you might face during migration. Keep in mind that overall scoping, implementation and planning consultation for data manipulation required or executing organizational migration is not covered by the extent of the support.

Planning the migration and testing is supposed to be executed by the customers and not the service providers.

You can consider communicating with your accounts executive to discuss professional services or look into the possibility of appointing consulting partners if you have doubts about your organization’s capacity to complete or manage migrating metadata and data.

Needless to say, appointing a professional service or consulting partner will incur additional costs.

Migrating from a Customized Salesforce Org to Other

Consider the following before preparing and migrating the target instance to import or receive the specified data:

  • Matching metadata must be established in the target org to import data from one organization to another properly.
  • Experienced and professional developers and admins often migrate metadata by deploying and retrieving via client tools (i.e., ANT migration tool).
  • Other factors (such as page layouts, recorder types, etc.) need to be customized for the target instance prior to migration.
  • If needed, you can accommodate new user groups by developing sharing models (roles, profiles, sharing rules, etc.)
  • Ownership rules should be reviewed.
  • All fields and data points from the source org need to be captured in the target.
  • Before importing data, migration should be tested. The recommended practice is running the migration in the sandbox, for starters.
  • After completing the migration, you should conduct data validation.

Importing or Migrating Data from One Org to Other

Before actually starting to import data into Salesforce, it’s important to be fully aware of how to import and choose the method for importing depending on your version and the number of records from the numerous tools available.

Firstly, a relationship among the records needs to be established. For that purpose, the records must be imported in a particular order. You would have to populate the import files with any newly created record’s Salesforce IDs from the target org since record relationships are stored in Salesforce and defined by the IDs.

Using the VLOOKUP function in Microsoft Excel is possibly the easiest and simplest method for adding new record IDs to the import files.

However, suppose you’re not entirely comfortable with a VLOOKUP. In that case, you can create a custom field for external IDs, and map/insert the previous IDs or any other identifiers from the source org to the newly created field. You can import relevant records via External IDs this way.

Upon importing accounts successfully into your new org, you have to replace all legacy account IDs in the import files with the new account IDs from your target org. You can use VLOOKUP to populate the import files with the account IDs created newly.

The way Salesforce objects relate to and affect each other can be displayed graphically using a data model to help plan and devise a strategy for the appropriate import order for your object(s).

The related records have to be defined. Their IDs should be included while importing by replacing all legacy record IDs with the newly created record IDs within the target organization. This will ensure proper association of all the new records with each other.

NB: While migrating data, the specific order for the object data must be maintained if you wish to preserve the record relationships. Such record relationships are identified and defined by their unique record IDs in Salesforce instead of the record names.

Hence, the old IDs must match and be replaced by the new data record IDs created within the target organization to prepare the imported relational data appropriately.

Importing Core Objects – Sample Recommended Order

Use the following recommended sample order to import your core objects:

  • Accounts
  • Campaigns
  • Contacts
  • Opportunities
  • Cases
  • Pricebooks
  • Products
  • Leads
  • Contracts


Hopefully, the discussion above has been able to clarify and provide some useful insight on migrating data in Salesforce. Follow the recommended best practices for the best results and appropriate data migration from one org to another.

Leave a Reply

Back To Top