- SalesforceChaCha
- Posts
- 💃 Moving Day for Orgs 🕺
💃 Moving Day for Orgs 🕺
Because records don’t pack themselves
Good morning, Salesforce Nerds! Data. Migration. Two of the scariest 😱 words a Salesforce professional can hear.
At its simplest, data migration is the process of moving information from one system to another.
That might mean upgrading from a legacy CRM, consolidating multiple orgs, or just moving spreadsheets into Salesforce. 📥️
It’s a bit like moving to a new house: every record is a piece of furniture 🛋️, every relationship is a doorway 🚪, and your new Salesforce org is the dream home 🏡 where everything should fit.
If packed correctly. But, halt! There be dragons here! 🐲
Poor migrations can stall projects, corrupt data integrity, or leave teams with broken business processes.
Done right, migrations set the foundation for scalability, maintainability, and configurability.
But, if the data house is messy on day one, every new feature sits on shaky ground.

TABLE OF CONTENTS
💃 Moving Day for Orgs 🕺
RECORDS, RELATIONSHIPS, AND RULES
CORE CONCEPTS EXPLAINED
A data migration isn’t just about “copy and paste.” ❌
A few key concepts drive the process:
🎯 Source vs. Target: Where the data comes from (source) and where it’s going (target). Your source might be another CRM, a SQL Server, or CSV exports. The target is Salesforce.
↔️ Mapping: Defining how source fields map to Salesforce fields. Without this, you risk trying to shove a king-sized bed into a twin-sized room.
📳 Transformations: Cleaning and reshaping data before load. Standardizing phone numbers, splitting full names, fixing rogue date formats.
🤝 Relationships: Parent-child links, lookups, and master-detail dependencies. These need careful sequencing or you’ll hit integrity errors.
☑️ Validation Rules & Triggers: Guardrails in Salesforce that can break a migration if not planned for. (Ever seen 100k records fail because of one “required field” rule? Painful.)
Here’s a quick Apex-style concept for sequencing inserts to preserve relationships:
// First insert parent Accounts
List<Account> accounts = loadAccountsFromCSV();
insert accounts;
// Then set Contact.AccountId before insert
List<Contact> contacts = loadContactsFromCSV();
for (Contact c : contacts) {
c.AccountId = mapAccountId(c.LegacyAccountKey);
}
insert contacts;
Nice and simple. It’s not about being clever; it’s about being deliberate. 💯
PICK THE RIGHT MOVING TRUCK
TOOLS AND TECHNIQUES
Salesforce offers several migration “vehicles,” each with trade-offs:
👉️ Data Import Wizard: Admin-friendly, UI-based, but limited in volume and objects. Perfect for small jobs.
👉️ Data Loader: The workhorse for bulk data—supports insert, update, upsert, delete, and export. CLI support makes it automation-friendly.
👉️ Metadata API (Change Sets): Great for config, not data. Don’t confuse the two.
👉️ Salesforce-to-Salesforce / External Services: Rare for migrations, but occasionally handy in hybrid architectures.
👉️ Gearset: While primarily a DevOps tool, Gearset shines with data deployment templates, letting you seed or migrate relational data sets repeatably.
Technique matters as much as tools. Always:
Use
upsert
overinsert/update
when migrating with external IDs.Run in batches to avoid governor limits.
Leverage CSV + static resources for small JSON-based factories when seeding test environments.
AVOID BROKEN BOXES AND DUPLICATES
BEST PRACTICE PLAYBOOK
Here’s the cheat sheet from years of painful lessons: 🤕
Profile Your Data – Know what you’re migrating. Count records, validate formats, and document relationships. Surprises here are project killers.
Clean Before You Move – Deduplicate and standardize before Salesforce. Garbage in, garbage out.
Stage the Loads – Parent objects first, then children. Accounts before Contacts. Opportunities before Products.
Disable Guardrails (Temporarily) – Validation rules, workflows, and triggers may need pausing. Just don’t forget to turn them back on.
Leverage External IDs – Use legacy keys for smooth upserts and relationship mapping.
Dry Runs Save Lives – Run full test migrations in sandboxes. Validate counts and relationships.
Document Everything – Mapping sheets, transformation logic, load order. Future-you (or the next consultant) will thank you.
Automate When Possible – For repeatable migrations (like refreshes), script with Data Loader CLI or Gearset’s templates.
Validate with the Business – Don’t declare victory until users confirm migrated records look right.
Archive Old Data – Not everything belongs in Salesforce. Sometimes a data warehouse (Snowflake, Redshift) is a better final resting place.
THINK LONG-TERM, NOT ONE-TIME
SCALABILITY AND MAINTAINABILITY
A migration isn’t just a one-off chore.
It sets the foundation for ongoing data quality and system agility.
Consider:
Scalability: Can your process handle millions of records? If not, chunk loads and use Bulk API where possible.
Maintainability: Can someone else repeat the process six months from now without deciphering cryptic SQL scripts? Document, script, and templatize.
Configurability: Use config-driven mappings (Custom Metadata Types or JSON in static resources) instead of hardcoding. This keeps things flexible as schemas evolve.
Example config-driven approach with CMDT:
public class FieldMapper {
public static String getTargetField(String sourceField) {
Mapping__mdt mapping = [
SELECT Target_Field__c
FROM Mapping__mdt
WHERE Source_Field__c = :sourceField
LIMIT 1
];
return mapping.Target_Field__c;
}
}
This small abstraction can make migrations future-proof instead of fragile.
BECAUSE NOBODY LIKES REWORK
WRAP-UP CHECKLIST
Data migration is never glamorous, but it is foundational. To keep your org healthy and your sanity intact, remember:
✅ Plan the load order.
✅ Clean and standardize data.
✅ Document mappings and transformations.
✅ Validate in sandboxes, not production.
✅ Use automation where repeatability matters.
✅ Partner with business users on validation.
Treat data migration like moving day: label the boxes, carry them in the right order, and don’t forget to unpack.
Do it right, and your Salesforce org becomes a home your business can actually live in.
Scalable, maintainable, and ready for whatever comes next.
SOUL FOOD
Today’s Principle
"The goal is to turn data into information, and information into insight."
and now....Salesforce Memes



What did you think about today's newsletter? |