
Andrew Hanna

Andrew Hanna

TL;DR: Data migration in Salesforce means moving records into an org, or between orgs, so they arrive with their relationships, owners and history intact. The reliable pattern is to deploy metadata first, give every record a stable external ID, upsert parents before children, rehearse in a sandbox, then validate counts and relationships. Most guides stop at the one-time legacy import, but the migration most teams run every month is org-to-org: production data into sandboxes and scratch orgs.
It is the movement of records, not configuration. There are two kinds:
Either way, the objects and fields must already exist in the destination, and the destination assigns its own record IDs. You cannot carry Salesforce IDs from one org to another, which is why relationships are the hard part.
sf data upsert bulk
upserts a CSV through Bulk API 2.0 with a required --external-id flag,
so loads can be scripted and repeated. Our guide to
mastering Salesforce development with the Salesforce CLI
covers the setup.
This is the gap in most guides, and it is the migration DevOps teams run most often. In Serpent it is a single flow: open the Migrate Data screen in the Data Management tab, pick a source and a destination org, turn on PII masking if you need it, start the migration, then review its progress and results. Built-in dependency checks reduce migration surprises, and the Migration Details page shows the execution timeline, with a Migrated Objects table you can filter by success and failed status. The full walkthrough is in the help center: data migration and masking.
Because metadata and data move in the same release flow, and Migrate Data is an action in the visual automation flow builder, the data a release depends on ships with the release instead of in a separate script. See Serpent data deployment for how that fits a pipeline; Deploy data is on every plan, including the free Essentials plan.
Copying production records into a sandbox copies the personal data in them too. Serpent's PII masking obfuscates common personal fields during preview and migration, which keeps production-shaped data usable in lower environments while meeting GDPR and similar rules. For repeatable test environments, Serpent seeds sample or masked data as part of environment setup and release pipelines, so refreshed sandboxes and scratch orgs come back populated without a manual script run. Our guide on how to seed a Salesforce sandbox with realistic data goes deeper.
Data belongs in your release process alongside code and configuration, one of the ideas behind the 5 pillars of Salesforce DevOps. For more how-tos, browse the SF Guides.
How many records can the Data Import Wizard handle?
Up to 50,000 records at a time. For more, Data Loader handles up to 150 million records at a time.
Do you need to migrate metadata before data?
Yes. Every object and field you load must already exist in the destination org with a matching type.
What is an external ID in a Salesforce migration?
A field that stores a stable key from the source system. Upsert uses it to match records and link children to parents without Salesforce IDs.
Can you migrate data between two Salesforce orgs without exporting CSVs?
Yes. An org-to-org tool such as Serpent's Migrate Data reads the source org and writes the destination in one run, with optional PII masking.
Commitment free!