How to merge duplicate accounts in Salesforce without regretting it
The short answer: In Lightning Experience you merge duplicate accounts from the View Duplicates list: pick up to three, choose one as the principal record, choose the field values to keep, and confirm. Related records move to the survivor and the others go to the Recycle Bin. Salesforce documents no undo button, so export both records first, choose the survivor on purpose, and start with a few pairs.
Search for a customer and two results come back: “Northwind Traders” and “NORTHWIND TRADERS INC”. One has the opportunity history. The other has the contacts and the open case. You know which is the real one. Nobody else does, and the person who created the second one has since left.
Merging is the obvious fix, and the native tool is perfectly capable of it. The hesitation is reasonable. Here is what the merge does, what it can’t take back, and a way to do it that leaves you a margin for error.
How does the native account merge work in Salesforce?
Open an account, click View Duplicates if Salesforce has flagged any, select up to three records, choose one as the principal record, pick any field values you want to keep from the others, and confirm. That is the Lightning Experience flow described on Salesforce Help.
Three details matter. First, you can merge business accounts or person accounts, but not one of each. Second, the merge list only shows accounts that your duplicate rules detect. For accounts they don’t flag, the same Help page points to the merge tool in Salesforce Classic. Third, if duplicates aren’t being flagged, review the Standard Account Matching Rule before blaming anything else.
Salesforce also says you can’t merge accounts in the mobile app.
What happens to related records and field values?
The principal account survives, the non-principal accounts go to the Recycle Bin, and related records are linked to the merged account with some exceptions. That is the short version of Salesforce’s “Considerations for Merging Duplicate Accounts”.
The detail, as the Help article states it:
- Related items such as campaigns and activities are linked to the merged record, with some exceptions.
- Chatter feeds come only from the principal record. Salesforce Files in the feed or the Files related list are kept.
- Team members from the non-principal accounts are kept on the merged account.
- Hidden and read-only data, such as sharing settings, comes from the principal record.
- Created By and Created Date come from the oldest of the merged records, and the merge date shows as the Last Modified date.
- You choose field values per field. Anything you don’t choose from the other records is lost with them.
- In orgs with Experience Cloud sites, merged contacts must belong to the same site type. To keep site-associated contacts, make the account with site users the principal.
There are also hard stops. Accounts tied to relationship groups can’t be merged in Lightning Experience, and team members with values in unique custom fields can block a merge until you clear them. If two accounts are indirectly related to the same contact, Salesforce asks you to remove the redundant relationship first. Read the full considerations page once before your first real merge. It is long, and it is the page that explains the error message later.
Who is allowed to merge accounts?
You need Delete access on accounts, and you must be an admin, the account owner, or a user above the owner in the role hierarchy. Reading the account requires Read access. This is from Salesforce Help for Lightning Experience.
The Delete requirement is the thing to remember. Merging is a delete of the losing record plus a reparent of its children, so it needs the right that a delete needs. Don’t hand it out because a rep wants tidy data. In orgs where team members have greater access to child accounts than the owner does, Salesforce says the merge may require Modify All Data on accounts.
Can you undo a merge in Salesforce?
Not natively as a merge. The pages I could read don’t describe an undo, and the one thing Salesforce does document is the Recycle Bin.
Help says the non-principal accounts “are moved to the Recycle Bin”, so a losing record can be restored while it’s still there. For contacts, a Salesforce Help article says that restoring the duplicate doesn’t change the master record, which keeps its “Contact Merged” history entry. It doesn’t say related records move back.
The undelete documentation in the API guide, which I could read only through a search excerpt, says records removed by a merge can be undeleted but that child objects were reparented and that can’t be reversed. Treat that as how it probably behaves, and test before you rely on it. Expect a restored account to come back without the contacts and opportunities that moved, and verify that in a sandbox. Items stay in the Recycle Bin for 15 days, per Salesforce Help, after which they are scheduled for permanent deletion.
So the honest answer is that a native merge is a one-way door unless you took a copy first.
What do duplicate rules and matching rules do?
A matching rule decides what counts as a duplicate, and a duplicate rule decides what happens when one is found: block the save, alert the user, and optionally report it. Salesforce’s duplicate rules page also says rules can run on creation or edit, and that duplicate rules don’t run on records that are manually merged.
Matching rules have limits worth knowing. Salesforce allows up to five active matching rules per object, 25 active in the org, and 100 in total. Fuzzy matching supports only Latin characters, and Salesforce recommends exact matching for international data. Don’t mix fuzzy and exact methods in one rule, or duplicates won’t be detected.
The Report option groups the duplicates it finds into duplicate record sets, which is the closest thing the platform has to a worklist. It’s useful. It isn’t a review screen. For where duplicates come from in the first place, see our post on importing a CSV into Salesforce safely.
What is a safe process for merging duplicate accounts?
Export first, choose the survivor deliberately, and start with a handful of pairs you can check by hand. That order matters more than any tool.
- Export both records and their children. Run a report on the accounts in the pair, with Id, owner, created date and the fields you care about. Export their contacts, opportunities and cases too, with their Ids. Salesforce’s mass-update guidance says to back up before any data operation, and a merge is one.
- Choose the principal on purpose. The principal’s sharing settings, hierarchy and feed survive, and the oldest created date wins regardless. Prefer the record with the site users, the parent in the hierarchy, and the integration ids. Opinion: when in doubt, keep the one more systems already point to.
- Decide field values before you click. Write down which phone, address and owner you want. The merge screen asks per field, and nothing you skip comes back.
- Merge three or four pairs. Then open the results as a user would: contacts, open opportunities, activity history, the sharing on the record.
- Scale up only after that. Batches of 20 or so, with a check after each.
What to do Monday:
1. Run your existing duplicate rules’ Report option, or the View Duplicates list, for accounts only, and count the pairs.
2. Pick five pairs where you are certain, export both sides with children, and merge them.
3. Check who in your org holds Delete on accounts, and whether they should.
Where we come in
Sluice, by GTM Cloud, is in early access. It builds on the duplicate rules you already have, lists duplicate groups for side-by-side review with a Result After Merge column, and takes a backup before each merge so you can undo it from History. It finds and resolves duplicates inside Salesforce. It doesn’t enrich records or match against outside data. See Sluice, or ask for a Data Health Check to size the problem first.
Questions people ask
How many accounts can I merge at once in Salesforce?
Up to three accounts per merge in Lightning Experience, according to Salesforce Help. One becomes the principal record and the others go to the Recycle Bin. For a long list, you repeat the merge pair by pair, which is why a worklist and a clear survivor rule save so much time.
Why doesn’t Salesforce show my duplicates in the merge list?
The Lightning merge list only shows accounts your duplicate rules detect. Salesforce Help says to review the Standard Account Matching Rule if duplicates aren’t flagged, and points to the Classic merge tool for accounts the rules miss. If your duplicates arrive through file loads, our guide to loading a CSV safely covers that side.
Which account should be the principal record?
The one you can least afford to lose parts of. The principal’s hidden and read-only data, such as sharing settings, carries over, and its feed is the one kept. If site users or a hierarchy parent sit on one record, make that record the principal. That is the Help guidance for site users, and my view for the rest.
Sources
- Merge Duplicate Accounts in Lightning Experience: steps, three-account limit, permissions, Classic tool for unflagged accounts.
- Considerations for Merging Duplicate Accounts: related records, principal data, restrictions, Recycle Bin.
- Things to Know About Duplicate Rules: actions, Report option, merges, creation and edit.
- Things to Know Before You Customize Matching Rules: matching rule limits and fuzzy matching.
- Recover Merged Salesforce Contacts: restoring a merged-away record.
- undelete() in the API guide: records removed by merge and reparented children (read via search excerpt only).
- Recycle Bin in Salesforce: 15-day window for restoring deleted items.
- Mass update records in Salesforce: back up before any data operation.