Skip to main content
Data CleansingDedupe Salesforce

Merging Duplicate Contacts and Accounts in Salesforce

By December 3, 2020January 26th, 2023No 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 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 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 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

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

Il'ya Dudkin

Ilya Dudkin is a Business Development Manager at Softwarium. He is a frequent contributor to popular Salesforce outlets such as SalesforceBen, Force Talks, SFDC Panther and many others as well.