Skip to main content
All CollectionsSystem Administrator Tasks
Matching Rules and Duplicate Rules
Matching Rules and Duplicate Rules
Updated over 9 months ago

Overview

Matching rules and duplicate rules work together to ensure that your users work with data that’s free of duplicates. Before your users save new and updated records, matching rules and duplicate rules provide warnings of potential duplicates. You manage matching rules and duplicate rules in Setup. In this article, we'll review the difference between matching rules and duplicate rules, in addition to how to create and modify these rules.

Matching Rules

Matching rules are used to identify duplicate records, Rethink by default includes matching rules for contacts. A matching rule consists of fields that are assembled into an equation using logic.

Screen_Shot_2020-01-23_at_3.06.33_PM.png

The fields are used as criteria to broadly filter what constitutes a duplicate. When a matching rule runs and compares two records. If fields for two records match fields and match the logic for that rule then the records two records will be identified as duplicates. Rethink algorithm also will detect similar records as seen below and notify of a possible duplicates.

Screen_Shot_2020-01-23_at_3.17.54_PM.png

However, if two fields are blanked and are included as part of the matching criteria rule. Then the records will not be flagged as duplicated. IN the example below you can see that the 2 title fields are left blank and for this reason, the duplicate manager has not raised a flag for possible duplicate records. As seen below:

Screen_Shot_2020-01-23_at_3.19.58_PM.png

The reason for this is because the original rule did not include fields left blank as matching fields. Additionally, this rule will not count fields that do match but were not included in the matching rule. Below we have two contacts that have the same filled out fields for department but have a blank field in the title filled which was part of the duplicate matching rule.

Screen_Shot_2020-01-23_at_3.25.12_PM.png

Custom Matching Rules

In order to correct the issue presented the images above. we'll create a new custom matching rule. This new rule will take into consideration fields that are left blank and also include the "department" field that previously was not being accounted for.

Screen_Shot_2020-01-23_at_3.27.49_PM.png

The image below illustrates how the new rule will compare records:

Screen_Shot_2020-01-23_at_3.28.06_PM.png

Creating a Custom Matching Rule

Below we'll walk you through the process of how to create this new custom rule:

1) Go to Setup.

2) Search for Matching Rules in the quick find search on the left-hand panel.

3) Under the duplicate management, category click on Matching Rules.

4) Click on the New Rule button to create a new rule.

Screen_Shot_2020-01-23_at_3.49.09_PM.png

5) Select the object you would like to create this rule for. For this example, we'll be selecting Contacts.

Screen_Shot_2020-01-23_at_4.03.30_PM.png

6) Name your new rule and provide a description of the rule (this field is not required).

Screen_Shot_2020-01-23_at_3.49.39_PM.png

7) Specify a matching method for each field you would like to include as part of your new rule. Here you'll see a choice for "fuzzy" which means Rethink will use it's the algorithm to best match the fields even if they are not identical or exact matching. Depending on the field type you'll have these options available.

Screen_Shot_2020-01-23_at_4.11.10_PM.png

8) After you made all the changes and selections click Save.

9) Then click the Activate to put the turn on this new rule.

Pairing the Matching Rule with a Duplicate Rule

Now we'll configure the settings so it puts our new rule to work within the contact object.

1) Go to Setup > Duplicate Rules.

2) Open the Standard Contact Duplicate rule.

Screen_Shot_2020-01-23_at_4.23.47_PM.png

3) Click Edit in order to edit this preference.

4) Scroll down this menu till you find the Matching Rules selection for the matching rule and choose the newly created rule from this dropdown menu.

Screen_Shot_2020-01-23_at_4.26.12_PM.png

5) Lastly, click Save and you are ready to start using your newly created matching rule.

Duplicate Rules

Duplicate rules determine how your org handles duplicate records.

Within Rethink Setup > Duplicate Rules you'll find several standard duplicate rules as shown below:

Screen_Shot_2020-01-24_at_11.42.40_AM.png

Rethink allows you to customize the message displayed when a duplicate is found or change the action made when the duplicate record is found from Alert to Block to prohibit duplicates from being made entirely. you can accomplish this by setting the setting for Action on Create to Block. See the image below for guidance.

2020-01-24_13-58-42__1_.gif

Furthermore, if you wish to prohibit users from editing contact records that they have been given access to, there is also an option in duplicate rules called Bypass Sharing Rules. When this is checked off it will not allow a user to edit a record in order to create a potential duplicate. Please note that this will not signal the user via an error message that they are creating a duplicate, it will simply disallow them from doing so.

Screen_Shot_2020-01-24_at_2.08.54_PM.png

Lastly, after creating and activating your duplicate rules, you'll want to check if your page layout contains the duplicate finder component. You can do this by search for the Lightning App Builder in Setup. Open the contact page layout and make sure the potential duplicate component is on the page, if it's not you can just add it by dragging it onto the page. (see the image below for guidance).

2020-01-24_13-22-06__1_.gif

Merging Duplicate Records

When a duplicate rule is activated and a user attempts to create a duplicate record, the user will be informed they are creating a potential duplicate even prior to saving the record.

Screen_Shot_2020-01-24_at_1.50.12_PM.png

By clicking View Duplicates, the user can open the existing contact and choose to add to this contact or proceed with creating the contact if the user deems the contact to not be a duplicate.

Screen_Shot_2020-01-24_at_1.51.41_PM.png

On existing duplicate records, when a user opens a contact record, they will be alerted to any potential duplicates.

Screen_Shot_2020-01-24_at_1.36.15_PM.png

By clicking on View Duplicates, the user will be presented with a list of possible duplicates identified by the matching rules set up in the previous steps.

To merge the duplicate records into one master record, click the checkboxes next to all of the contacts to resolve for, then click Next. Note, up to three (3) records can be selected and merged at once.

Screen_Shot_2020-01-24_at_1.38.56_PM.png

In the next screen, choose the desired master record for the merge. Then, select the values to keep. The selected values will be written to the master record. All related child records including activity will be merged into the master record.

Once you've elected the information you wish to keep, click Next.

Screen_Shot_2020-01-24_at_1.39.22_PM.png

Lastly, confirm the selection - once you've merged records this action cannot be undone.

Screen_Shot_2020-01-24_at_1.39.44_PM.png

If you require more information on duplicate rules or how they relate to matching rules. Salesforce provides a great learning module on the topic of Resolving and Preventing Duplicate Data.

Did this answer your question?