How to Match Salesforce Contacts to Accounts Before Import
Join Salesforce Contacts and Accounts CSV exports, append AccountId only for unique matches, and review missing or duplicate account matches before import.
A Contacts export often contains a company or account name, while a Salesforce relationship import works best when the Contact row contains the actual Account record ID. If you simply join on account name and pick the first duplicate, a repeated company name can attach a Contact to the wrong Account.
The Salesforce Contact-to-Account Import Joiner uses Contacts as the main file, Accounts as the lookup file, and writes AccountId only when the selected key resolves to exactly one Account. Missing and duplicate-key matches stay visible for review.
Start with two Salesforce exports
Your Contacts file can be simple:
contacts.csv
Your Accounts file needs the field you want to match plus the Salesforce record ID:
accounts.csv
The two Northwind rows are intentional: they show why duplicate handling matters.
Match the files safely
- 01
Choose Contacts and Accounts
Load both CSV exports. They stay in the browser processing path and are not uploaded to Nablyx for the join.
- 02
Choose the matching fields
For example, match Contacts.AccountName to Accounts.Name. If you have a stable external customer key, prefer that over a display name.
- 03
Choose the Account ID source
Select the Accounts column that contains the Salesforce record ID, commonly Id. The output column is named AccountId.
- 04
Review the summary
Unique matches, unmatched Contacts, and ambiguous Contacts are counted separately. Ambiguous means the selected key matched more than one Account.
- 05
Download and import
Download the enriched Contacts CSV. Resolve every blank AccountId that still needs an Account relationship before using your normal Salesforce import workflow.
What each result state means
| Result | Meaning | AccountId in output | | --------- | ------------------------------------------- | ---------------------------------------- | | Matched | The Contact key matched exactly one Account | Filled from the chosen Account ID column | | Unmatched | No Account used that key | Blank | | Ambiguous | More than one Account used that key | Blank |
This is stricter than a generic “use first duplicate” join. CSV row order should not decide a Salesforce relationship.
Choose a key that is actually unique
Account Name is convenient, but it may not be unique. Subsidiaries, regional accounts, legacy duplicates, or intentionally repeated display names can all create ambiguity. If your organization exports an external customer ID, ERP account number, or another stable unique value into both files, use that instead.
Do not turn on case-insensitive matching when your selected key is a Salesforce record ID. Salesforce documents 15-character IDs as case-sensitive and recommends the 18-character case-safe form for integrations. The tool preserves the ID text from your Accounts export; it does not manufacture or convert Salesforce IDs.
If an Account key is ambiguous, fix the duplicate source data or choose a more specific key. The tool intentionally leaves AccountId blank rather than choosing the first Account in the CSV.
Before you import
Check the review table first. A blank AccountId can be valid if the Contact should remain without an Account, but it can also mean the chosen match key is missing or duplicated. Verify those rows against Salesforce before import.
For another structural check, run the downloaded file through Validate CSV. If you need to rename or reorder columns for a separate import template, use CSV Column Mapper.
Salesforce's documentation on record IDs explains the 15- and 18-character formats. Its Data Loader troubleshooting documentation also lists malformed or incorrect IDs as a cause of import/update failures.
FAQ
Does the tool upload Contacts or Accounts to Salesforce?
No. It prepares a CSV locally in your browser. You still perform the actual import using your normal Salesforce tools and permissions.
What if Contacts already contains AccountId?
The generated file uses the exact AccountId column. A unique match replaces the existing value with the ID from the selected Accounts column; unresolved rows are left blank so a stale relationship is not silently retained.
Can I match on email or another custom field?
Yes. The key pickers show the columns in each CSV. The fields do not need the same column name, but their values need to represent the same key.
See the transformation
Two tables meet on one exact lookup key.
Add matching customer details to each order while keeping missing or repeated matches visible.
Need to do this now?
Match Salesforce Contacts to AccountsRelated tools
Open the tool this guide is about, or explore a related one.
- Join CSV files online freeJoin two CSV files on matching key columns, choose inner, left, or full results, and control duplicate lookup keys without uploading your data.
- CSV column mapper and renamerRename, reorder, and remove CSV columns before importing data into a CRM, store, database, or accounting system — without uploading your file.
- Validate CSV files online freeScan a CSV once for structural, encoding, header, delimiter, and whitespace problems without changing the file.