Skip to main content

How to Match Salesforce Contacts to Accounts Before Import

Nothing uploadedTested up to 10 MB

Join Salesforce Contacts and Accounts CSV exports, append AccountId only for unique matches, and review missing or duplicate account matches before import.

Published: 2026-09-23Updated: 2026-09-233 minMatch Salesforce Contacts to Accounts
Data workflow illustration for How to Match Salesforce Contacts to Accounts 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

FirstName, LastName, Email, AccountNameLena, Hoffmann, lena@example.test, Acme GmbHMarco, Rossi, marco@example.test, Northwind Labs

Your Accounts file needs the field you want to match plus the Salesforce record ID:

accounts.csv

Id, Name, ExternalKey001000000000001AAA, Acme GmbH, ACME-DE001000000000002AAA, Northwind Labs, NORTH-01001000000000003AAA, Northwind Labs, NORTH-02

The two Northwind rows are intentional: they show why duplicate handling matters.

Match the files safely

  1. 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.

  2. 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.

  3. 03

    Choose the Account ID source

    Select the Accounts column that contains the Salesforce record ID, commonly Id. The output column is named AccountId.

  4. 04

    Review the summary

    Unique matches, unmatched Contacts, and ambiguous Contacts are counted separately. Ambiguous means the selected key matched more than one Account.

  5. 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.

orders.csv · customer_id
orderkeyamount
1001C-4284.50
1002C-9142.75
customers.csv · id
keynametier
C-42Aminapro
C-42AminaVIP
Result
orderkeynametier
1001C-42Aminapro
1002C-91——