Admins / Developers

Merge Duplicate Records in Salesforce Lightning

By Ines Garcia

The ability to merge duplicates in Lightning has been around since the Spring ‘17 release and yet many people are unaware of this feature or how to use it effectively!

There is very little content out there on this topic and we are here to set that right – because as we all know, dirty data is a huge problem and a cause of poor user adoption and low ROI. Let’s dive into how to merge duplicates in Lightning Experience.

How to Merge Duplicates in Salesforce – Get Ready!

Remember, way back when (*cough* *cough* in Classic *cough*), we used to merge Accounts and Contacts using the ‘Tools’ option in the bottom right section of the Account or Contact tab?

Whilst we may still hold fond memories of those classic days, we’re here to tell you that Lightning makes it much clearer when duplicates exist and offer a nicer duplicate interface.

Merging duplicates in Salesforce relies on you setting up duplicate and matching rules, so be sure to do that first! You should also check out “Salesforce Duplicate Management: 5 Phase Process to Deduplicating Your Salesforce Org Data” to understand the capabilities of native functionality and when to look for third party solutions.

Without further ado, let’s take a look at:

  • How to merge duplicate Salesforce Contacts
  • How to merge duplicate Salesforce Accounts

How to Merge Duplicate Contacts in Salesforce

Once you have created Duplicate and Matching rules, Salesforce is able to identify potential duplicates in your org. However, you need to add the “Potential Duplicates” component to your Lightning record page, to be able to see them!

This is really simple to do. Just open the Contact Record Page/s in the Lightning App Builder and drag and drop the “Potential Duplicates” component onto the page. Save and activate, if needed.

Now, navigate to a Contact record (preferably the one you know has duplicates) and select “View Duplicates” to review which other records have matched the existing duplicate rules.

You can use the wizard to select the master record and the values you want to keep from different fields upon merge:

How to Merge Duplicate Salesforce Accounts

Similarly to Contacts, ensure your Account Record Page contains the “Potential Duplicates” component to display, when duplicates exist:

From that component, you can select “View Duplicates” to review which other Account records have matched the existing duplicate rules. You can use the wizard to select which is the master record and which values to keep from different fields upon merge.

It also works with Person Accounts:

Duplicate Record Sets

Duplicate Records Sets are like list views for Duplicate Rules and display records that have been identified as duplicates. They are created when your duplicate rules for Salesforce are triggered.

Most people are not aware that these groups of duplicate records can be accessed from the App Launcher and even used to search and merge duplicates without going to an individual record page.

The greatest strength of Duplicate Record Sets is that they enable you to search records – this is great when you KNOW you have a duplicate record but it has not been picked up by your duplicate/matching rules and is not showing in the “Potential Duplicates” component.

Simply navigate to the Duplicate Record Set of the object in question, select related and add junction records from the set to the duplicates:

Once done, you can follow the process of comparing and merging.

Merging Duplicate Considerations

  • Remember hidden fields – they won’t show on the wizard, yet the values are retained from the record marked as primary.
  • Chatter feeds are only retained from the primary record.
  • Audit fields such as Created By and Created Date are kept from the primary record and merging will update the Last Modified field.
  • Manual Sharing and Sharing Rules are applied to the merged account.
  • Contacts marked as the “Primary Contact” from the non-master records, will lose their status as the “Primary Contact”.
  • Merging is not yet available in mobile.

Bonus: One of the benefits of this merging in Lightning is that you can merge Contacts from different Accounts.

Summary

Merging records in Lightning Experience is available and useful! As an admin, you want (need!) to keep on top of potential duplicates to ensure trustworthy data that is reflective of your awesome admin skills.

You can also empower your users to merge themselves, although they will require the ‘Delete’ permission for the object in question and Edit on related objects, such as Opportunities and Cases.

Don’t forget to take advantage of the Duplicate Record Set tab and create reports from the items that are created from your Duplicate Rules. Remember they are the pillar of this functionality, so you want to inspect and adapt them often to keep it relevant and useful.

The Author

Ines Garcia

Ines Garcia founder of www.getagile.co.uk , is an Agile Coach, Certified Scrum Professional (CSP®-SM) and a Salesforce MVP, together helps organisations to become more agile.

Comments:

    Tomi
    October 27, 2021 5:43 pm
    Can this also be applied to Household records in Financial Services Cloud?
    thierry LAFFIN
    October 27, 2021 6:07 pm
    The article says "Salesforce is able to identify potential duplicates in your org." the problem is there and the reason, alas, to stick to classic wihc allows manual operations. In most cases Lightning so-called intelligent algorithmes are UNABLE to identify duplicates. Does LEx read financial press cuts to know that Arthur Andersen has renammed ACCENTURE ? Does LEX read the church announces to know that Miss X has changed her name marrying Mr Y ? etc.
    Terry Cole
    October 27, 2021 6:12 pm
    I still almost always have to switch back to classic to merge accounts. I notice a duplicate set manually. Sometimes I change the name so they match more perfectly. But still it doesn’t show up in the potential duplicate component. I’m very frustrated and sad that there still is no equivalent to manually causing a merge from scratch in lightning. And it should be noted that for nonprofit users, the match rules don’t support in PSP well and the duplicate merge action for contacts is not safe. I keep hoping that this will be addressed. It really wouldn’t be that hard.
    Nila Ray
    October 27, 2021 10:10 pm
    Great article! However merge functionality used to be much simple in classic as opposed to what they have created in Lightning experience. I wish they made the process a bit simpler where you could leverage the merge functionality without having to really use the duplicate record set feature. I the like the fact that merge function has definitely become more powerful in Lightning but the flow could have been easier.
    Jaime
    October 27, 2021 11:22 pm
    Great feature! Just waiting to be able to set specific duplicate rules where you can check custom fields values like 2nd email or so with the main Email field.
    Stephen Stanley
    October 28, 2021 4:40 am
    Do be aware that it also combines the related records into a single list of related records, so if you have been studiously maintaining the duplicates instead of merging them, then you may end up with duplicate related records that need to be deleted

Leave a Reply