If you’ve ever hesitated before clicking Next on the mapping screen, this is the fix. Build every CSV with field API names in row 1 and Data Loader’s auto-match goes from “probably right” to “can’t be wrong.”
On this page
- The problem
- Label vs API name
- Naming rules
- 1 · Row 1 = API names
- 2 · Run and verify
- Troubleshooting
- Gotchas and FAQ
Labels lie. API names can’t.
Data Loader’s auto-match is only as good as your CSV headers. Give it labels and it guesses. Give it API names and it can’t be wrong.
Auto-match is the one thing that makes the Data Loader mapping screen bearable (the UI has real 1989 energy). But a label isn’t unique: two fields can both be “Favorite Color”, a managed package like Financial Services Cloud can add its own copy of a standard field, and labels get renamed while API names stay put. Map by label and the load runs, errors are low, and later you find data in the wrong field.

Prefer to read? Everything in the video is written out below.
Two identifiers, one guarantee.
The label is for people. The API name is for code, integrations and Data Loader, and Salesforce forces it to be unique on the object.
| Label | API name | |
|---|---|---|
| Example | Favorite Color | Favorite_Color__c |
| Unique on the object? | No | Yes |
| Changes over time? | Often | Rarely, and not once code uses it |
| Used by | Users | Apex, merge fields, integrations, Data Loader |


The naming rules.
Salesforce starts from the label and cleans it up.
- Special characters are stripped. Question marks, dashes and so on don’t carry over
- No leading numbers. “1st Favorite Color” becomes
X1st_Favorite_Color__c - Spaces become underscores
- Underscores have limits: none at the end, none back to back
- Unique on the object, always. Custom ones end in
__c


Put API names in row 1.
Data Loader only reads the first row when it auto-matches.
- Row 1: API names, nothing else. This is what auto-match reads.
- Row 2 (while you work): the labels, so a client or reviewer can read the file.
- Columns you don’t want loaded: put an
Xin front of the header (XNotes). Auto-match skips them, and anyone scanning the file can see they’re deliberately out.

Delete the labels row before you load. Data Loader treats every row after the header as a record, so a labels row left in gets loaded (or fails) as data.
Run it and watch auto-match work.
The demo is an upsert on Contact, matched on a Legacy ID.
- Save the CSV. Open Data Loader and choose Upsert.
- Pick Contact and the file. Match on Legacy ID, an External ID field.
- Create or Edit a Map → Auto-Match Fields to Columns. With API-name headers, everything lines up.
- Choose an output folder and finish. 1 upsert, 0 errors.
- Open the record and check: Favorite Color = green, Favorite Color 2 = blue. Each value went to the field you meant.

Typing API names by hand gets old. The free tools in the API names post pull them for you.
When the mapping goes wrong.
| Symptom | Check |
|---|---|
| Auto-match misses columns | Row 1 holds API names, with no typos or trailing spaces |
| Data in the wrong field | You mapped a label. Look for two fields with similar labels and pick by API name |
| Field missing from the mapping list | Field-level security, or Data Loader needs a fresh login after the field was created |
| Field won’t update | It’s read-only or a formula, or the match key isn’t in Salesforce |
| Duplicate value on upsert | The match field isn’t unique in the file or the org |
Other error codes are in the Data Loader errors post.
The questions people ask.
Why API names and not labels?
Can I keep labels in the file?
How do I stop a column from mapping?
Fastest way to get API names?
How do I know it worked?
Mapping is where migrations go right or wrong.
The Masterclass walks through the whole migration, including the field mapping workbook I use to get every object right before the first load.
Know someone who still maps Data Loader by label?
Share on LinkedInOne CSV is a tutorial. Forty objects, 15 years of history and a go-live date is a project. That’s the part I do for a living.
See how I run migrations →