Duplicate Rules and Matching Rules
by AR Designs
3 months ago
0
What Are Duplicate Rules?
A duplicate rule helped you to define what happens when we view a record with duplicates or start creating a duplicate record. Salesforce provides standard out-of-the-box duplicate rules for accounts, contacts, and leads. Based on the business requirement you can also create custom duplicate rules in Salesforce.
With Duplicate rules, we can define when Salesforce found a matching record and determines actions to take as it encounters duplicates.
What Are Duplicate Rules?
A matching rule helped you to define how duplicate records are identified in duplicate rules and duplicate jobs. Salesforce provides out-of-the-box standard matching rules for accounts, contacts, and leads. Based on business requirements you can also create custom matching rules in Salesforce. With matching rules, we can define the criteria to identify duplicate records.
Salesforce Duplicate Rules Example
Take one example. Businesses want to make sure agents will not create duplicate records based on account name.
Matching rules and Duplicate rules work together to ensure your org data is duplicate-free. So we need to build matching rules first and then create duplicate ones.
Create a Custom Matching Rule
Follow the below step-by-step process to create the matching rules in Salesforce.
- Click on Setup then search the matching rules in quick find.
- Then click on matching rules then click on the New Rule button.
- After that select the object on which you want to apply the matching rule. In our case Account object

- Provide the Rule name and set the matching criteria. Then click on the Save button.
- Once done then not forget to click on the Active button

- Now it is time to set up the duplicate rule. provide the all required details.
- Specify what happens when a user tries to save a duplicate record as Allow and provide the error message.
- Select newly created matching rules in the matching rules section like the below screen

- Add the Optionally, conditions a record must meet for the rule to run.
- Then click on the save and activate the button.
Test Duplicate Rules:
Now it is time to test the duplicate rules. Create one account with the same name and street which is already available in your Salesforce org. Then It will give you an error message with one View Duplicate option. Like the below screen.

NOTE: I will still allow you to save the record because you selected the allow duplicate in duplicate rules. If you do not want to allow then select the block option

Merge Duplicate Record
It is time to merge duplicate account records. If you want to merge the duplicate record then click on the related list and find the View Duplicate option

Then select the other duplicate record which you want to merge and click on the next button. From that, you can select Master record and you can also merge the field values base on the record.

Then click on the next and confirm button.