Duplicate Rules and Matching Rules in Salesforce : Amit Chaudhary
by: Amit Chaudhary
blow post content copied from Apex Hours
click here to view original post
In this post we will talk about Duplicate Rules and Matching Rules in Salesforce. Matching rules and Duplicate rules work together to ensure your org data is duplicate free. Duplicate management in Salesforce helped you to detect duplicates record base on custom duplicates and marching rules.
What is Duplicate Rules?
A duplicate rule helped you to define what happens when a we views a record with duplicates or starts creating a duplicate record. Salesforce provides standard out of the box duplicate rules for accounts, contacts, and leads. Base on business requirement you can also create custom duplicate rules in Salesforce.
With Duplicate rules we can define when Salesforce found matching record and determines actions to take as it encounters duplicates.
What is Matching Rules?
A matching rule helped you to defines 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. Base on business requirement 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. Business want to make sure agent will not create duplicate record base on account me and Street address.
Matching rules and Duplicate rules work together to ensure your org data is duplicate free. So we need to build matching rules first then we will create the duplicate rules.
Create a Custom Matching Rule
Follow 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 New Rule button.
- After that select the object on which you want to apply the matching rule. In our case Account object
![Matching Rule in Salesforce](https://i0.wp.com/www.apexhours.com/wp-content/uploads/2022/08/image.png?resize=1024%2C304&ssl=1)
- Provide the Rule name and set the matching criteria. Then click on Save button.
- Once done then dont forget to click on Active button
![Matching Rule criteria](https://i0.wp.com/www.apexhours.com/wp-content/uploads/2022/08/image-1.png?resize=1024%2C588&ssl=1)
Create a Custom Duplicate Rules
Once your matching rules are ready then it time to create duplicate rules. Follow below step to create the duplicate rules.
- Click on Setup then search the duplicate rules in quick find.
- Then click on duplicate rules then click on New Rule button then select the Account object like below screen
![Duplicate Rules in Salesforce](https://i0.wp.com/www.apexhours.com/wp-content/uploads/2022/08/image-2.png?resize=1024%2C216&ssl=1)
- Now it time to setup 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 matching rules section like below screen
![Create Duplicate Rules in Salesforce](https://i0.wp.com/www.apexhours.com/wp-content/uploads/2022/08/image-3.png?resize=1024%2C773&ssl=1)
- Add the Optionally, conditions a record must meet for the rule to run.
- then click on save and activate button.
Test Duplicate Rules
Now it time to test the duplicate rules. Create one account with same name and street which already available in you Salesforce org. Then It will give you error message with one View Duplicate option. Like below screen
![](https://i0.wp.com/www.apexhours.com/wp-content/uploads/2022/08/image-4.png?resize=1024%2C833&ssl=1)
Then click on View Duplicate link to see duplicate records like below screen
![View Duplicate Records.](https://i0.wp.com/www.apexhours.com/wp-content/uploads/2022/08/image-5.png?resize=1024%2C305&ssl=1)
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 block option
Merge Duplicate Record
It time to merge duplicate account records. If you want to merge the duplicate record then click on related list and find the View Duplicate option
![](https://i0.wp.com/www.apexhours.com/wp-content/uploads/2022/08/Screen-Shot-2022-08-06-at-4.51.02-PM.png?resize=840%2C173&ssl=1)
Then select the other duplicate record which you want to merge and click on next button. From that you can select Master record and you can also merge the field values base on record.
![Merge Duplicate record on Account object](https://i0.wp.com/www.apexhours.com/wp-content/uploads/2022/08/image-6.png?resize=1024%2C459&ssl=1)
Then click on next and confirm button. Congratulation now you know how to setup duplicate rules in Salesforce and how to merge two duplicate records.
Recording
Check recording to step by step process to create the duplicate rules in Salesforce.
Duplicate Rule Consideration and Best Practices
Foll below duplicate rule consideration and best practices.
- You can use to to 5 active duplicate rules per object
- If the first rule finds a match for a record subsequent duplicate rules skip that record
- Condition Under which duplicate Rules Don’t run
- Records are created using quick create or community self registration.
- Leads are converted to account or contacts.
- Records are restored with the un-delete button
- Record are added using Lightning sync
- Record are manually merged.
- Condition under which duplicate rule settings are overridden
- Records are added using the data import tools
- Record are added or edited using Salesforce APIs
- Translation workbench doesn’t support the customizable alert text in duplicate rules.
Summary
Matching rules and Duplicate rules work together to ensure your org data is duplicate free.
The post Duplicate Rules and Matching Rules in Salesforce appeared first on Apex Hours.
August 07, 2022 at 02:49AM
Click here for more details...
=============================
The original post is available in Apex Hours by Amit Chaudhary
this post has been published as it is through automation. Automation script brings all the top bloggers post under a single umbrella.
The purpose of this blog, Follow the top Salesforce bloggers and collect all blogs in a single place through automation.
============================
![Salesforce Salesforce](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd8KuA5gBDkbvhh_j7E9OAPbV4fNCp9awPqDL_QhZOAWN8TdMT8diieDFeimEcY5jJnawoWwdk4ZjuFow_0_qu5MCfOiXmw3C9QyJCahyAvTAmbeL_LfnPAUpBI-a3Nu4uIRv4hDZGhCc/s1200/Blaze.png)
Post a Comment