If you’ve ever tried to get a mountain of data into Salesforce and keep it clean, you know the pain: weird characters, duplicates, errors, and just the general fear of screwing it up. This guide is for admins, analysts, or anyone who’s stuck cleaning up messy data before it goes into the system. No magic bullets, just a clear, battle-tested process that actually works.
Step 1: Get Real About Your Data
Before you even open Salesforce, get a grip on what you’re importing. Most headaches happen because folks rush in without looking at what they’re dealing with.
- Start with a sample. Open your dataset (CSV, Excel, whatever) and scroll around. What columns are there? Are names in ALL CAPS? Are dates all over the place? Any mysteries in there?
- Look for weirdness. Common issues: empty rows, extra spaces, special characters, duplicated rows, or columns that don’t match what Salesforce expects.
- Ask: What do I need? Don’t import data just because it exists. If you only need 5 columns, don’t try to shove in 20.
Pro tip: If you’re importing into standard Salesforce objects (like Leads or Contacts), grab a template export first so you know which fields are required and what formats Salesforce likes. This saves a ton of time later.
Step 2: Clean Your Data Before Import
If you skip this part, you’ll be fixing problems for months. Garbage in, garbage forever.
The Basics
- Trim spaces from the start and end of every cell. Tools like Excel’s
TRIM()
function or Google Sheets’=trim()
are your friends. - Standardize formats:
- Dates: Pick one (like YYYY-MM-DD) and stick with it.
- Phone numbers: Decide on a format, e.g., (555) 555-5555.
- States/countries: Use official abbreviations, not “Calif.” or “United States of America.”
- Remove duplicates by sorting on unique fields (like email or ID). Most spreadsheet tools have “Remove Duplicates.”
- Fill in missing required fields. If Salesforce needs a value and you don’t have it, decide now: can you pull it from somewhere, or should you drop the row?
Fixing Common Problems
- Non-printing characters: Sometimes data exports from other systems have hidden characters (
\r
,\n
, weird ASCII stuff). Use “Find and Replace” or a text editor like Notepad++ to clean these out. - Broken emails: Run a quick check for
@
and.
in email columns. Not perfect, but better than nothing. - ID mismatches: If you’re updating records, make sure your IDs match Salesforce’s record IDs, not some old CRM’s.
Ignore:
- Hyper-cleaning every field unless it’s critical. Don’t waste hours fixing things no one will ever use.
Step 3: Map Your Data to Salesforce Fields
Now, figure out where everything goes in Salesforce. This is where lots of imports go sideways.
- Download a field list. In Salesforce Setup, go to Object Manager > (Object name) > Fields & Relationships. Export this if you can.
- Match columns to fields. Make a mapping sheet: “My Column” → “Salesforce Field Name.”
- Check field types. A text field won’t accept a date. Picklist fields have limited options—if your data says “CA” but the picklist wants “California,” you’ll get errors.
- Decide how to handle missing or extra data. For unmapped columns, drop them. For missing Salesforce-required fields, go back and fix your source.
Pro tip: Don’t try to force-fit fields. If you don’t have a place for something, leave it out or talk to your admin about adding a custom field before you import.
Step 4: Choose the Right Import Tool
Salesforce has a few ways to get data in. Use the right tool for your job:
- Data Import Wizard:
- Good for small-to-medium jobs (up to 50,000 records).
- Best for simple imports into Leads, Accounts, Contacts, Campaign Members, and custom objects.
-
Less flexible, but friendly UI.
-
Data Loader:
- For large imports (up to 5 million records).
- Handles all standard and custom objects.
- Can do inserts, updates, upserts, deletes, and exports.
-
Needs to be installed on your computer. Command-line mode for power users.
-
Third-party tools (Dataloader.io, Informatica, etc.):
- For really big or complex jobs, or if you need automation.
- Sometimes easier for recurring imports, but comes with a learning curve and price tag.
What to ignore: Fancy “ETL” platforms unless you’re dealing with truly massive, ongoing migrations. Most people just need Data Loader.
Step 5: Run a Test Import
Never, ever do your big import first. Pick 10–100 rows and do a test run.
- Import into a sandbox, not production. That way, if it goes wrong, you don’t have to explain to your boss why 10,000 records are missing phone numbers.
- Check for errors. Most import tools spit out an error file. Read it. Fix mistakes in your source data.
- Look at the results in Salesforce. Are the names right? Do picklists match? Anything look weird?
Pro tip: If your test import fails, don’t just patch the symptoms. Go back and fix your source data and mapping. Otherwise, you’ll be chasing problems forever.
Step 6: Import the Full Dataset (Carefully)
Ready to go? Here’s how to avoid disaster:
- Back up your Salesforce data first. Always. Use Salesforce’s Data Export or take a snapshot with Data Loader.
- Break up big imports. If you have 500,000 records, don’t import all at once. Do batches of 50,000–100,000. It’s less likely to choke and easier to fix if something goes wrong.
- Monitor for errors. Watch for error messages during import. Fix and re-import failed rows as needed.
- Don’t run imports during business hours if you can help it. Large imports can slow down your org.
What to ignore:
- Super-fancy import options unless you really need them. Keep it simple and focus on getting clean, accurate data in.
Step 7: Post-Import Cleanup
You’re not done yet. Even with the best prep, things can go sideways.
- Spot-check your records. Search for a few and make sure key fields look right.
- Run duplicate checks. Salesforce has built-in duplicate rules. Turn them on and see if any slipped through.
- Validate picklists and relationships. Make sure related records (e.g., Accounts and Contacts) linked up correctly.
- Document what you did. Note what worked, what you fixed, and what you’d do differently next time. Future-you will thank you.
Step 8: Set Up Ongoing Data Hygiene
One clean import won’t save you if new garbage keeps coming in.
- Turn on Salesforce validation rules to prevent bad data at entry.
- Schedule regular deduplication (monthly or quarterly).
- Train users on what “good data” means. If folks are hand-typing “N/A” or “asdf” into required fields, nip it in the bud.
- Automate where you can, but don’t over-complicate things. Even a simple CSV export and a quick scan can catch a lot.
Real-World Notes: What Works, What Doesn’t
Works: - Cleaning data before you import (not after). - Testing in a sandbox. - Breaking big jobs into smaller batches.
Doesn’t: - Trusting source data blindly. - Skipping required fields “just this once.” - Relying on Salesforce to magically fix your bad data.
Ignore: - Expensive tools unless you really need them. - Importing every possible field “just in case.” - Over-engineering. Most orgs just need clean, basic data.
Keep It Simple (and Don’t Panic)
Big Salesforce imports don’t have to be a nightmare. Take it step by step, clean your data first, and don’t rush. Most problems happen when people try to do everything at once or skip the boring prep work. Keep your process simple, document what you did, and remember: it’s always easier to fix problems before they’re in the system. If you mess up, don’t panic—just iterate and try again. Good luck!