Managing Duplicate Records in Salesforce
Maintaining clean and accurate data is critical in any CRM system. Salesforce provides tools to manage duplicate records in Salesforce.In Salesforce there are Duplicate Rules and Matching Rules to help users prevent or manage duplicate records.Duplicate Rules can be created for Accounts,Contacts,Leads and any Custom Object.
User permissions required to create and edit duplicate rules are View Setup and Configuration and Customize Application.
Steps to create Duplicate Rules:
Step 1:Creating Matching Rules
:-Matching Rules define the criteria for which two records can be considered as duplicates.
1. Search for Matching Rules in Quick Find and select Matching Rules.
2. To create a new rule click on New Rule and select the object for which the rule has to defined and click on next.
3. Name the rule as you like and specify the Matching Criteria for the rule.Here you select one or more fields for which the records must be compared.There are two methods of matching :Exact and Fuzzy.
The exact matching method looks for strings that exactly match a pattern. The fuzzy matching methods look for strings that approximately match a pattern. Specific fuzzy matching methods are available for commonly used standard fields on accounts, contacts, and leads.If the Match Blank Fields checkbox is selected then if the fields being compared on both records are empty then they are considered matched
Specify a filter logic of your own if needed.
4. Click on save and activate the rule.
Step 2:Creating Duplicate Rules
:-Duplicate rules defines what action should be performed when duplicates records are detected.
1. Search for Duplicate Rules in Quick Find and select Duplicate Rules.
2. To create a new duplicate rule click on New Rule and select an object.
3. Give the rule a name and choose whether to enforce or bypass sharing rules.If sharing rules are bypassed the matching rule compares all records, regardless of user access, but the resulting list of possible duplicates includes only records the user has access to.If sharing rules are enforced the matching rule compares only records that the user has access to, and the resulting list of possible duplicates includes only records the user has access to.
4. Specify the actions to be taken when a duplicate record is being created and edited.
We can either allow or block duplicate records from being saved.If we select Allow and Alert, while a duplicate record is being saved it shows an alert displaying existing records which are similar and the user can open an existing record instead.Or else the user can create a similar record.If we select Block then the rule will alert the user that a similar record already exists whenever a duplicate is being created.
5. Specify the matching rule.Select the object with which it should be compared and select the Matching Rule for that object.
6. Optionally specify a filter conditions for the rule to run.Click on save and activate the rule.
Here’s a look on how the Duplicate Rule works.
Click on View Duplicates to view the duplicate records.
Duplicate Record Sets:When a user creates a duplicate record it is saved as an item in Duplicate Record Set.These sets contain duplicate records for various objects.
Creating Reports on Duplicate Records
When the Report option is selected in the Duplicate Rule users can create reports which display the duplicates of records for a particular duplicate rule.To create Duplicate Reports create a custom Report Type by selecting an Object and relating the Duplicate Record Items to the primary object.
Now users can create reports based on the report type.
A duplicate records report can include these records.
- Duplicates created when a rule alerts a user to a possible duplicate, but the user creates the duplicate anyway (to generate this report, select the Report option in a duplicate rule).
- Records manually added to a duplicate record set.
- Records in duplicate record sets generated by duplicate jobs.
Run Duplicate Jobs in Lightning Experience
Run Duplicate Jobs to find duplicate Accounts,Contacts,Leads across your org.Duplicate jobs are only available in Perfomance and Unlimited editions.
Steps to run a duplicate job:-
1)Search for Duplicate Jobs in Quick Find.
2)Click New Job and select an Object.
3)Select a matching rule available for that object or create a new one.
What’s new in the Winter ’18 Release
With the release of Winter ’18 now we can use in Duplicate Record Sets in Lightning Experience also.
When the Report option is selected in a duplicate rule, Duplicate Management creates duplicate record sets of duplicates found by the rule. You can also create duplicate record sets, adding any records you like as duplicate record items manually.Users also have an option to Merge duplicate records into a single record.
Steps to merge duplicate records:-
1. Open the Duplicate Record Set and click on Compare and Merge.
2. Select the records that you want to merge.
3. Select the record which you want as the master record and click on next.
4. Finish by clicking on Merge.
Now all the duplicate records are merged into a single record.The Compare and Merge option is only available in Lightning Experience.
What’s new in the Winter ’19 Release
With release of Winter ’19 we can apply Deterministic Encryption to the fields used in Matching Rules.
This feature is available as an add-on subscription in Enterprise,Perfomance and Unlimited edition.Avilable in Developer Edition free of cost for orgs created in Summer ’15 or later).First the administrator has to enable Deterministic Encryption.Before encrypting any fields deactivate any Matching rules or Duplicate Rules that reference the fields you want to encrypt.
Steps to Encrypt Fields:-
1. From Setup search for Platform Encryption and select Encyption Policy.
2. Click on Encrypt Fields and select the fields which you want to encrypt and select Determinstic as the Encryption Scheme.
3. Click Save.
4. Reactivate your Matching Rule and Duplicate Rule associated with it.
Matching rules used in duplicate management now return exact and fuzzy matches on encrypted data.
Thus Duplicate Management helps users easily manage and remove duplicate records from salesforce thus saving time and confusion.