May 13, 2025: Note, this article has been updated to reflect current behavior.
Most organizations using Salesforce rely on the account-based approach to prospecting, which is highly personalized and designed to focus on the most high-value accounts. Unlike other approaches, account-based selling involves teams across various departments and if the “Contacts to Multiple Accounts” feature is enabled for your Salesforce organization, there is a likelihood of duplicates. Since these types of duplicates eliminate a single customer abstract, they can result in serious problems and a lot of confusion amongst your teams. To further complicate the situation, to resolve this issue you may need to merge two duplicate contacts that are indirectly related to the same account or merge two duplicate accounts that are indirectly related to the same contact. Salesforce does not permit this and will return the following error message:
Can’t merge accounts. These accounts have the same related contact. Remove the redundant account-contact relationships and then try merging again.
If you are trying to merge duplicate contacts, the text of the error message will be the same, except it will begin with “Can’t merge contact.”
Salesforce requires you to remove the duplicate relationship manually before it can merge the accounts or contacts. If you are not familiar with the concept of direct and indirect relationships, a direct relationship resulted when you first created the contact and matched it with an account. Indirect relationships arise when, at a later point, you added other relationships between a contact and other accounts. In addition to merging the accounts, you also need to make sure that all the relationships between an account and contacts persist during the merge.
How to Merge Duplicate Contacts in Salesforce
In order to maintain your Salesforce data clean and make sure that your work within teams does not suffer from any hitches, merging shared Contacts is essential. Discover how to leverage Salesforce’s Lightning Experience to identify and merge duplicates Contact records like shown in this guide.
Step 1: Set Up Duplicate Management (Admin Step)
- Go to Setup (click the gear icon in the top right).
- In the Quick Find box, type “Duplicate Rules”.
- Review or create a Duplicate Rule for Contacts.
- Ensure the rule is set to Allow and Report or Alert on potential duplicates.
Step 2: Enable “Potential Duplicates” on the Lightning Page
- Navigate to a Contact record.
- Click the gear icon and select Edit Page.
- In the Lightning App Builder, drag the “Potential Duplicates” component onto the layout.
- Click Save and Activate the page if needed.
Step 3: Identify Duplicate Contacts
- Open any Contact record that may have duplicates.
- Look for the “Potential Duplicates” panel (usually on the right side).
- Click View Duplicates to review the suggested matches.
Step 4: Start the Merge Process
- In the Potential Duplicates window, select the records you want to merge.
- Click the “Merge” button.
Step 5: Choose the Master Record
Salesforce will show a side-by-side comparison of the selected records.
For each field, choose the value you want to keep in the final merged record.
The record you choose as the Master Record will remain, and the others will be merged into it.
Step 6: Confirm and Merge
- Double-check your selections.
- Click Merge to finalize the process.
- You’ll see a confirmation message once the merge is successful.
How To Merge Duplicate Accounts in Salesforce
Keeping your Salesforce data clean and organized is crucial for effective account management. If you’ve identified duplicate Accounts in your system, Salesforce provides built-in tools to help you merge them and maintain a single source of truth—ensuring all related data stays intact and up to date.
Step 1: Search for Potential Duplicates
- Use the global search bar to look up the Account name.
- Review the search results to identify possible duplicates based on name, address, or other key fields.
- Open one of the duplicate Account records.
Step 2: Click the “View Duplicates” Button (if enabled)
If Duplicate Rules are active, you’ll see a “View Duplicates” button or a Potential Duplicates section on the record page.
- Click it to review matched Accounts. If this option is not visible, you can still merge manually via the next step.
Step 3: Manually Select Duplicate Accounts to Merge
- Navigate to the Accounts tab.
- Click “Merge Accounts” in the Tools section. (Uou must be in Salesforce Classic or switch to Classic temporarily, as this tool is not fully supported in Lightning.)
- Enter a search term (such as the Account name) and click Find Accounts.
- Select up to three Accounts you want to merge, then click Next.
Step 4: Choose the Master Record
- You’ll see a side-by-side comparison of the selected Accounts.
- Select the checkbox for the Account you want to keep as the Master Record—this one will remain after the merge.
- For each field, choose which data to keep in the merged result.
Step 5: Merge the Accounts
- Once you’ve reviewed and confirmed the field values, click Merge.
- If prompted, confirm your action. The non-master records will be deleted and their related data (Contacts, Opportunities, etc.) will be moved to the master Account.
Merging Duplicate Accounts in Salesforce with Multiple Direct and Indirect Contact Relationships
Let’s take a look at this example, Initech Consulting LLC has two duplicate account records in your Salesforce organization which are related to five contacts between them. Some of the contacts are directly related to their respective accounts; others are indirectly related. As soon as you identify the duplicate accounts, you try to merge them only to encounter the error message mentioned above. So, what are your options for deduplicating these accounts?
The built-in functionality inside DataGroomr will remove the redundant relationship automatically, allowing you to proceed with the merge. All of the contacts from the duplicate record(s) will be shifted over to the master record while maintaining all of the relationships. After the merge is completed, the account will be streamlined with one company and the three correct contacts. The entire process is depicted in the diagram below.
Merging Salesforce Duplicate Accounts Sharing the Same Contact
Another scenario is where there are two duplicate accounts that share a relationship with a single contact. Perhaps the only difference being is that one relationship is direct and the other one is indirect. Again Salesforce will not permit the accounts to be merged, but you can use DataGroomr to get around this restriction. DataGroomr will remove the redundant relationship and merge the accounts while maintaining only the direct relationship. This scenario is depicted in the image below.
In the example above, the duplicate accounts have a direct relationship with the same contact (the result would be the same if the relationship was indirect). Only the direct relationship would be maintained after the merge.
So far we only review merging duplicate accounts, but what about duplicate contacts? Let’s take a look at some of these examples.
Merging Salesforce Duplicate Contacts with Multiple Account Structures and Shared Indirect Accounts
If you try to merge duplicate contacts with redundant account relationships, you will get the same error message as you did when you tried merging duplicate accounts. Salesforce will require you to manually remove the redundant relationships and then try merging again. DataGroomr removes the redundant relationship automatically allowing the merge to go through as shown in the diagram below.
DataGroomr also makes it easier to merge duplicate contacts with multiple account structures. While it is possible to merge these contacts in Salesforce, the process is clunky and time-consuming. DataGroomr will do this automatically for you as shown in the diagram below.
This saves you the time and hassle of manually removing the redundant relationships and eliminates the confusion caused by duplicate records.
Trust DataGroomr with the Most Complex Duplicate Scenarios
DataGroomr continues to innovate its application through Machine Learning. Recently, we added advanced rules for merges, giving users an ability to customize how the Master Record is selected and which Field Values will be stored there. A rule can be designated as the default in your organization and will be used automatically for manual merges of duplicate contacts and accounts. For mass merges, users will be able to select any of the existing rules from a drop-down list.
If you aren’t using DataGroomr already, give it a try. Here is a link to a free 14 day trial.
FAQ
Merging records in Salesforce means that you are merging duplicate records into one master record. It is worth mentioning here that the Salesforce native functionality only allows you to merge three records at a time. If you want to merge en masse, you will need a third-party application, like DataGroomr.
An org merge is when you merge two or more instances of a Salesforce CRM. You combine the integration of the various technological backends of these orgs into a new whole.
No, only object records can be merged, i.e. leads, contacts, cases, and accounts. In Salesforce, each user is uniquely identified with a username, password, and profile, and it is not possible to merge two users together.
Yes, you can merge cases from the Cases List View or from the Case Record Home. When you merge cases, you select one case to be the master. You can compare the field values, and select the values that you want to use in the master record. All related lists, feed items, and child records are added to the master.
This depends on the type of API you are using. REST APIs do not support merge requests. SOAP, on the other hand, will generate Web Service Description Language (WSDL) and have sessions to allow merges more securely.
You should look for a merge app that will simplify the duplicate merge process and eliminate any manual work on your part. Setting up merge rules to identify various types of duplicates can be tedious and time consuming, which is why you should look for an app that will streamline this process.