
Andrew Hanna

Andrew Hanna

The short answer: good Salesforce data migrations clean and map data before moving it, load owners and parents before children using external IDs, suspend automation during the load, mask personal data before it reaches a sandbox, and validate the result. The practice most guides skip is the one that matters most for DevOps teams: run data through the same reviewable release flow as metadata, because moving data between orgs is not a one-off project. It happens every sprint.
Most best-practice guides describe one move from a legacy CRM into Salesforce. That happens once. What Salesforce teams do every week is move data between their own orgs: reference data for a new feature, test records for UAT, a refreshed sandbox that comes back empty. Done by hand with CSV exports, each run is an unreviewed change with no history.
Our view: if metadata goes through version control, review and a pipeline, the data that metadata depends on should too. A feature that ships without the configuration records behind it is a broken release, however clean the deploy log looks. We made that case for growing teams in scaling pains in DevOps and data management, and the same pipeline principles run through mastering Salesforce DevOps.
For the full sequence of a first migration, see our step-by-step data migration guide.
Record IDs do not carry over between orgs, so a Contact's Account lookup from production points at nothing in a sandbox. Give every source record an external ID, upsert on it, and resolve lookups through it. Load owners and parents first: as the Trailhead large data volumes module notes, child records cannot load if their parents do not exist yet. External IDs also make reruns safe, because an upsert updates the record it already created instead of duplicating it.
Usually yes, and then turn it back on deliberately. Salesforce's guidance is to set validation and assignment rules inactive, switch triggers off with a custom setting, and, if you load under a Public Read/Write sharing model, defer sharing processing until after cutover. Afterwards, add lookups and roll-up summaries, reset the trigger switches and re-enable the rules. The risk is not the bypass. It is forgetting the re-enable step, which is why it belongs in a scripted, reviewable flow.
Mask it in transit, not afterwards. Copying real customer records into a sandbox and cleaning them later means they sat unmasked in an environment with wider access. Salesforce sells Data Mask & Seed for this. In Serpent, PII masking obfuscates common personal fields during preview and migration, so production-shaped data stays usable for testing while meeting GDPR and similar rules.
Built-in dependency checks reduce migration surprises, and because Migrate Data is an action in the visual automation flow builder, metadata and data move in the same release flow. Sandbox seeding runs as part of environment setup and release pipelines, so refreshed sandboxes and scratch orgs come back populated without a manual script run. Full steps are in the data migration and masking guide, and the data deployment overview shows where it sits in the pipeline.
Take a backup before you write. The Backups view captures a known-good state and keeps a Restore History. It complements rollback, which reverses a release, because data is harder to reverse cleanly than metadata. See backup and restore. Deploy data is on every plan, including the free Essentials plan, and backup and restore starts on Scale.
Why do child records fail to load in a Salesforce migration?
Usually the parent record or the owner does not exist in the target org yet. Load owners and parents first and resolve lookups through external IDs.
Should I use Data Loader or the Data Import Wizard?
The wizard suits loads under 50,000 records on supported objects. Data Loader handles up to 150 million records and scheduled loads.
Should sandboxes hold real production data?
Only masked. Mask personal fields during the migration so unmasked records never reach a lower environment.
Can a Salesforce data migration be rolled back?
Not as cleanly as metadata. Back up the target before the load so you can restore a known-good state.
Serpent moves data and metadata in one release flow, with masking and backups built in. If your team still migrates data by CSV, start with data deployment.
Commitment free!