The Do’s and Don’ts of Duplicate Management in Salesforce Part II
The Do’s and Don’ts of Duplicate Management in Salesforce Part II

The Do’s and Don’ts of Duplicate Management in Salesforce Part II

03/11/2022 by Annemarie Forgie
Dramatically improve data quality and increase productivity by following these important do’s and don'ts to help find and resolve duplicate records in your Salesforce org.

In our last post on duplicate management, we discussed some critical success factors for setting up duplicate management in Salesforce. Today we are going to take a look at how to tackle existing duplicates in your org and break down some of the most important considerations that you should keep in mind when eliminating duplicates.

DO: Use Reports to Monitor Duplicate Records

Once you have your Matching and Duplicate Rules set up and activated with the Report action enabled, Salesforce will automatically start keeping track of potential duplicate records as they are created and edited to match the criteria you defined.

Understanding Duplicate Record Sets

Before we create a report we’ll need to understand Duplicate Record Sets. Duplicate Record Sets are created when two or more records are identified as duplicates. This occurs when Duplicate Rules fire or a Duplicate Job runs. A Duplicate Record Set will contain one Duplicate Record Item for each potential duplicate Account or Contact found by the Matching Rule (e.g. a Duplicate Record Set might contain one Item for Robert Jones and one item for Bob Jones).

You can find and manage Duplicate Record Sets by searching for the tab in the App Launcher. Duplicate Record Sets are a very useful tool on their own and can be used to view the list of records identified as duplicates and see which duplicate rule triggered the match, as well as compare and merge records within the Duplicate Record Set (more on that later). 

It is a great idea to create list views and filter them by different duplicate rules or other criteria. One thing to note is that Duplicate Record Sets are not automatically deleted even when records are merged or no longer meet your matching criteria. You could manually delete the empty record sets, or if you’d prefer a less painful option for hiding duplicates that have been merged, try adding a filter to select only Duplicate Record Sets with Record Count greater than one. This way you’ll only see a list of record sets that contain at least two potential duplicate items.

Pro tip: Add a filter to select only Duplicate Record Sets with Record Count greater than one

Create Custom Report Types

In order to run reports on potential duplicate records, we’ll also need to create a few Custom Report Types - one for each object where we want to report on those potential duplicate records. Reports are created based on Duplicate Record Sets and/or Duplicate Record Items. You can create a report type by choosing Account, Contact, Lead, or Duplicate Record Set as the primary object and then selecting Duplicate Record Items as the secondary object.

You will need to create a report type with Accounts, Contacts, or Leads as the primary object and Duplicate Record Items secondary. Duplicate Record Set and Duplicate Record Items objects don't contain much data on their own, so by starting with another object, such as Contact for example, you’ll be able to add any relevant Contact fields to the report such as name, address, email, etc.

Another one of my favorite tips is to add fields related to Duplicate Record Items via lookup to the report layout. In particular, the Duplicate Record Set: Rule Name and Duplicate Record Set: Record Count fields will come in handy when creating reports — you’ll thank me later! 

Creating a Duplicate Records Report

Now that we have our Custom Report Types set up we are ready to start creating some reports! It’s most useful to group reports by Duplicate Record Set Name and Duplicate Rule Name so you can see which records are contained in each record set and which duplicate rule triggered the match. It is also helpful to display the same fields used in your matching criteria as columns in the report for easy comparison of records at a glance.

Potential duplicate report made from custom report type Contacts with Duplicate Record Items

Potential duplicate report made from custom report type Contacts with Duplicate Record Items

DON’T: Let Overwhelm Sabotage Your Progress

Now that you have your duplicate reports created, you may be overwhelmed by the sheer number of potential duplicate records that exist in your org. The thought of tackling them all at once can be stressful to say the least. But do not fear — you can do this! 

Instead of trying to do it all at once, create a plan to review and merge a few duplicate records on a regular basis. Start small and focus on achievable goals that you can reach with consistency. This may be a daily, weekly, monthly, or quarterly process depending on how many potential duplicates exist in your backlog and how quickly new duplicates tend to pile up, but either way, make sure you’re not waiting too long before checking in on your reports.

DO: Understand Your Options for Merging Duplicates

When you're ready to start merging duplicate records there are a few different ways you could go about it. Let’s take a look at some of the most common methods.

Merge From the Duplicate Record Set Record

This is a great method when you are working from a duplicate records report. You can simply click on the Duplicate Record Set Name from the report and then choose Compare and Merge from the drop-down menu.

Duplicate record items screenshot window showing three items

Merge From the Potential Duplicates Component

This method is most useful when you come across potential duplicates while going about your day-to-day work in ​​Salesforce. Simply click on View Duplicates from the Potential Duplicates Component or Toast Message.

Merge From the NPSP Contact Merge Tab

This is actually the only option we recommend for our nonprofit clients to merge duplicate Contacts. While Duplicate Records Sets and Potential Duplicates Components are useful in so many ways (and we advise you use both of them regularly!) the standard Salesforce merge functionality available through these tools is not recommended to use with NPSP Contacts.

This is because the Contact Merge tab for NPSP will merge Household Accounts in addition to Contact records. Otherwise, you’ll be left with empty Anonymous Households for every Contact that is deleted as a result of a merge action. You’ll want to make sure you navigate to the Contact Merge via the App Launcher and search for your Contacts from there. The standard merge tool and NPSP Contact Merge look almost identical so be careful to check you are in the right stop before merging your Contacts.

Screenshot of Potential Duplicates Records

Check out NPSP How-To Series: Merge Duplicate Contacts and Trailhead: Manage Duplicate Contacts and Accounts in Nonprofit Success Pack to learn more.

Potential Duplicate Records - View Duplicates Screenshot

DON’T: Merge or Delete Data Randomly

Merging duplicates is an irreversible process and not something to be taken lightly. Always remember to Merge With Caution and take the time to carefully review each field before proceeding with the merge action. It is good practice to backup your data on a regular basis and ideally before working through a big chunk of duplicates in case you need to refer back to the old records for any reason.  

We also highly recommend that only the system administrator, and possibly a few key super users, be allowed to merge records. This can be achieved by restricting access to the delete permission on each object. 

Nonprofit Success Pack - selected contacts shown for merging duplicates

Prevent data loss by capturing unique data before merging the records.

Screenshot of merged contact shown with contact details

Manually add data captured during the merging process to appropriate fields. In this example, we captured the additional email address in NPSP’s Personal Email field and created a custom field to store the contact’s nickname.

Bonus tip: create a formula field using the BLANKVALUE() function to create a custom Greeting field which will display the Nickname or FirstName if Nickname is blank. You can then use this field for your Informal Greeting in NPSP Settings. 
Resources

Conclusion

While it may never be possible to completely eliminate duplicates, taking advantage of custom report types and reports is one of the best ways to stay on top of your data and maintain clean, accurate records. Remember to create a regular maintenance schedule so you don't become overwhelmed and always follow best practices when merging records. With these tips in mind, you will be well on your way to success!

Stay tuned for our next article The Do’s and Don’ts of Duplicate Management in Salesforce Part III where we’ll discuss considerations around third-party duplicate management tools and ongoing maintenance strategies.

What are some of your favorite ways to prevent duplicate records? Tweet directly at me on Twitter @SalesforceAF.