Merging accounts in Salesforce means combining two or more duplicate company records into a single master record
When your team enters the same company multiple times — under slightly different names, with different contact information, or from different sources — you end up with duplicate accounts that split your data across records. Salesforce's merge function consolidates these duplicates into one master account, keeping the information you choose and discarding the rest. The process is straightforward for accounts with no related records, but becomes more complex when opportunities, contacts, or cases are attached to the duplicates you want to merge.
The merge happens at the account level only. You cannot merge contacts, leads, or opportunities directly through the standard merge tool — those require different approaches. Once you merge two accounts, the losing account is deleted, and all its related records (contacts, opportunities, cases) move to the winning account.
Key Takeaways
- Salesforce's merge tool combines duplicate accounts into one master record, moving all related contacts and opportunities to the winning account.
- You can merge up to three accounts at a time, and the process is permanent — deleted accounts cannot be recovered without a full backup restore.
- Before merging, check what contacts, opportunities, and cases are attached to each duplicate so you know what will move and what might conflict.
- Custom fields, roll-up summaries, and workflow rules may behave unexpectedly after a merge, so test the process in a sandbox first if your org uses complex field logic.
- If you need to merge contacts or leads instead of accounts, you will need to handle those separately or use a third-party tool.
Finding and identifying duplicate accounts before you merge
Start by searching for the accounts you suspect are duplicates. Use the search bar at the top of Salesforce and look for variations in company name — "Acme Corp", "ACME Corporation", "Acme Co." often appear as separate records. Check the account list view and sort by company name, creation date, or industry to spot patterns that suggest duplicates.
Open each suspected duplicate and compare the account details: billing address, phone number, website, industry, and number of employees. Look at the related lists at the bottom of each account record to see how many contacts, opportunities, and cases are attached. If one account has all the active relationships and the other is mostly empty, the empty one is usually the duplicate to delete. If both have active relationships, you will need to decide which information to keep and which to discard during the merge.
Salesforce also offers a Duplicate Management tool (available in certain editions) that automatically flags suspected duplicates based on matching rules you set. If your org has this enabled, check the Duplicates tab on the account record to see if Salesforce has already identified matches for you.
How to merge two or three accounts step by step
Open the account record you want to keep as the master. This is usually the account with the most complete information or the most active relationships. Click the Tools menu (or the three-dot menu icon, depending on your Salesforce version) and select Merge Accounts.
A merge window opens. Click Find Accounts to Merge and search for the duplicate account by name. Select it from the results. Salesforce shows you both records side by side. If you want to merge a third account, click Add Account to Merge and repeat the search. You can merge up to three accounts in one operation.
For each field, Salesforce shows the values from each account. Click the radio button next to the value you want to keep in the master record. If a field is blank in your chosen master account, you can select a value from one of the duplicates to fill it. Once you have chosen which values to keep, click Merge. Salesforce combines the records and moves all related contacts, opportunities, and cases to the master account. The duplicate accounts are deleted when ready.
What happens to contacts, opportunities, and cases during a merge
All contacts, opportunities, and cases attached to the duplicate accounts automatically move to the master account. You do not choose which ones move — they all transfer. If both the master and duplicate accounts have a contact with the same name, both contacts remain on the master account as separate records. Salesforce does not merge contacts automatically, even if they appear to be the same person.
Opportunities and cases follow the same rule: they all move to the master account, but duplicates are not automatically combined. If you had an open opportunity on both the master and duplicate account with the same name and stage, you will now have two opportunities on the master account. You will need to manually delete or consolidate these afterward if they represent the same deal or issue.
Activity history (tasks, events, emails logged to the account) also transfers to the master. This means you keep a complete record of all interactions with both the old and new account records, which is usually what you want for reporting and compliance.
Testing a merge in a sandbox before doing it in production
If your organization uses complex field logic — custom fields with formulas, roll-up summaries that calculate values from child records, or workflow rules that trigger on account changes — test the merge in a sandbox environment first. The behavior of these fields after a merge can be unpredictable, especially if the formula or rule references fields that differ between the master and duplicate accounts.
Create a sandbox copy of your production org (your Salesforce administrator can do this). Locate the same duplicate accounts in the sandbox and perform the merge there. Check whether roll-up summaries recalculate correctly, whether custom fields display the values you expected, and whether any workflows or automations fired unexpectedly. If something breaks, you can adjust your field logic or merge strategy before doing the same merge in your live org.
This step is especially important if you are merging accounts that have different values in fields that drive reporting, forecasting, or automation. A test merge takes 15 minutes and can save hours of data cleanup later.
What you cannot undo and how to prevent mistakes
Merged accounts cannot be recovered through the Salesforce interface. Once you click Merge, the duplicate account is permanently deleted. The only way to restore it is if your Salesforce administrator has a full backup of your org from before the merge — and even then, restoring a backup means losing all changes made since that point.
To prevent accidental merges, ask your Salesforce administrator to restrict the merge permission to specific users or roles. Not everyone on your team needs to be able to merge accounts. If your org uses change sets or deployment tools, test the merge in a sandbox first and document which accounts you merged and why, in case you need to explain the change later.
Before you merge, take a screenshot or note of the account numbers and key details of both records. If a question comes up later about what happened to a contact or opportunity, you will have a record of which account it came from.
Merging contacts and leads instead of accounts
Salesforce does not have a built-in merge tool for contacts or leads. If you have duplicate contacts under the same account, you will need to manually delete the duplicate and reassign any related records (tasks, opportunities, cases) to the contact you want to keep. This is a manual process and takes longer than an account merge.
For duplicate leads, the same limitation applies. You can delete the duplicate lead, but Salesforce does not automatically move its history or related records to another lead. Some organizations use third-party apps from the Salesforce AppExchange to merge contacts and leads, but these are not part of the standard platform.
If you need to merge many duplicate contacts or leads, talk to your Salesforce administrator about whether a third-party tool or a custom workflow would be worth the investment.
Frequently Asked Questions
Can I merge accounts if one of them has open opportunities?
Yes. All open opportunities move to the master account automatically. If both accounts have opportunities for the same deal, you will have two opportunity records on the master account and will need to manually delete or consolidate them afterward.
What happens to the account ID after a merge?
The master account keeps its original ID. The duplicate account's ID is deleted and cannot be used again. If you have external systems or integrations that reference the old account ID, you will need to update those references to the master account ID.
Can I merge accounts if they have different billing addresses?
Yes. During the merge, you choose which address to keep in the master record. The other address is discarded. If you need to keep both addresses, consider creating a separate Billing Address object or custom field before merging, or keep the duplicate account and link it differently.
How long does a merge take?
The merge itself is when ready, but Salesforce may take a few minutes to update related records and recalculate roll-up summaries. During this time, the account may be locked and unavailable for editing. Wait a few minutes before trying to access the merged account.
What if I accidentally merged the wrong accounts?
Contact your Salesforce administrator when ready. They may be able to restore from a backup if one exists, but this is not may provide. Prevention is easier than recovery — always double-check which account is the master before clicking Merge.