Duplicate Rules and Matching Rules

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.

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.