Andrew Hanna

Andrew Hanna

Salesforce Data Migration Best Practices for DevOps Teams

Salesforce Data Migration Best Practices for DevOps Teams

TL;DR: The best practices for Salesforce data migration are to scope and back up first, clean and map the data, load parents before children using external IDs, pause automation deliberately, rehearse in a sandbox and validate every run. The part most guides skip: the migration you run once is not the one that hurts. The one you repeat every sprint, org to org and sandbox to sandbox, belongs in your release pipeline.

What are the data migration best practices for Salesforce?

  1. Scope it. Decide which objects and fields move, and agree what each field means before anything changes.
  2. Back up, then verify the backup. An untested backup is an assumption, not a safety net.
  3. Clean at the source. Merge duplicates, fix email and date formats, and align free text with the target picklist values.
  4. Map with external IDs. Record IDs change between orgs, so give every source record a stable key and map children to it.
  5. Load in hierarchy order. Accounts before contacts, contacts before opportunities.
  6. Pause automation on purpose. List the flows, triggers and integrations you defer, and who approves switching them back on.
  7. Rehearse in a sandbox. Run the full load end to end before production sees it.
  8. Validate every run. Compare record counts, read the failures and spot-check relationships and ownership.

Our step-by-step data migration guide walks through each step in detail.

Why is a one-time migration the wrong mental model?

Most top-ranking advice is written for a legacy CRM moving into Salesforce once. That project is real, but it is not where DevOps teams lose their weeks. They lose them to repeat migrations: refreshing a UAT sandbox with production-shaped records, moving reference data alongside a release, seeding a scratch org so a feature can actually be tested. Each one is small, and each one done by hand with a CSV is a fresh chance to break a relationship or leak personal data.

Our position is simple: treat data like metadata. If it ships with a release, it should be repeatable, reviewed and visible in the same pipeline. That is the idea Serpent is built on. We made the same case in scaling pains for growing Salesforce teams, and data is usually where those pains surface first.

Which Salesforce data migration tool fits which volume?

Salesforce's own Trailhead guidance draws the lines by volume:

  • Data Import Wizard: up to 50,000 records, built into Setup.
  • Data Loader: between 50,000 and 5 million records.
  • Large data volumes: Data Loader or an ETL tool configured to use the Bulk API.

Those tools answer how to get a file into an org. They do not answer how to move related records from one org to another, masked, every release. That is a DevOps job, and it is what Serpent data deployment is built for. For the wider tooling landscape, see mastering Salesforce DevOps.

How do you keep relationships and history intact?

  • External IDs. They preserve parent-child links and make later incremental loads possible.
  • Parent ID ordering. Trailhead recommends ordering data sets by parent record ID to avoid locking.
  • Audit fields. To keep original created dates and creators, enable Set Audit Fields upon Record Creation and grant that permission to the migrating user. As the name says, it applies when records are created.
  • Owners. Map departed users to active ones before the load, not after.

How should you handle personal data in lower environments?

Copying production into a sandbox copies its personal data too, so mask it on the way. Salesforce offers Data Mask & Seed for sandboxes. In Serpent, PII masking obfuscates common personal fields during preview and migration, so lower environments keep production-shaped data while you meet GDPR and similar rules. Seeding runs as part of environment setup and release pipelines, so refreshed sandboxes and scratch orgs come back populated without anyone running a manual script.

How do you validate a migration and recover from a bad one?

Validation needs evidence, not a green toast. In Serpent, the Migration Details page shows the execution timeline, and the Migrated Objects table filters by success and failed status, so you read the failures instead of hunting for them. Built-in dependency checks reduce migration surprises before they become orphaned records.

Recovery is a separate question. Rollback reverses a release, but data and already-deleted metadata are harder to reverse cleanly. That is why backup matters: Serpent's Backups view captures a known-good state, recovers supported org metadata and records, and keeps a Restore History. Details are in the backup and restore guide.

What does a migration look like inside a Serpent pipeline?

  1. Open Migrate Data in the Data Management tab.
  2. Pick a source and a destination org.
  3. Turn on PII masking if the destination is a lower environment.
  4. Start the migration, then review its progress and results.

Full steps live in the data migration and masking guide. To make it repeatable, add Migrate Data as an action in the visual automation flow builder, so metadata and data move in the same release flow. Deploy data is on every plan, including the free Essentials plan, and backup and restore starts on Scale. Compare plans on pricing.

If the migration is part of an org consolidation, users and integrations move too. Our authentication migration guide covers that side.

FAQ

What should you fix first before a Salesforce data migration?

Duplicates. Merge them in the source system, because duplicate contacts are a common problem and cost far more to untangle after the load.

Should you disable automation during a data load?

Defer non-critical automation for large loads, but document exactly what you paused and who switches it back on.

Can you keep original created dates when migrating?

Yes. Enable Set Audit Fields upon Record Creation, grant the permission to the migrating user and set the values when the records are inserted.

Is data deployment included on Serpent's free plan?

Yes. Deploy data is on every plan, including Essentials. Backup and restore starts on Scale.

Related Articles

Curious about faster shipping before you dive in? Let's talk

Commitment free!