Skip to main content
Data CleansingDedupe Salesforce

Merge Duplicate Contacts and Accounts in Salesforce

By January 26, 2023September 22nd, 2024No Comments

January 26, 2023: 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. 

The nice thing is that you can now use DataGroomr to get around these Salesforce restrictions.  If you need to merge two contacts indirectly related to the same account or two accounts indirectly related to the same contact, this functionality is available for you. DataGroomr has also added a feature to easily merge duplicate contacts with multiple account structures.

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.

merge duplicates in Salesforce

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.

merge accounts in Salesforce

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.

merge duplicate contacts in Salesforce

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. 

merge salesforce accounts

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

What does merge do in Salesforce?

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.

What is a Salesforce org merge?

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.

Can we merge two users in Salesforce?

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.

Can we merge two cases in Salesforce?

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.

Can you merge duplicate records via a Salesforce merge API?

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.

What should you look for in a Salesforce merge app?

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.

This article was submitted by Il’ya Dudkin from Softwarium.

Il'ya Dudkin

Il’ya Dudkin is the content manager and Salesforce enthusiast at datagroomr.com. He has more than 5 years of experience writing about Salesforce adoption, duplicate detection issues and system integrations with MuleSoft. He also works with IT outsourcing companies to facilitate the adoption of new Salesforce apps and increase user acquisition and loyalty.