By Rohit Sharma and Nishant Bansal
While working on a recent project in Salesforce, we needed to detect potential duplicates when records are added in the system via integrations — when accounts, contacts and leads are created from third party integration, data loader or soap API. During our findings, we discovered a new feature added by Salesforce in the Spring 2015 release. Duplicate management is introduced under Data.com administration.
This blog will give you a brief insight into duplicate and matching rules. Duplicate management uses Data.com technology, but does not require a Data.com license. It’s available in professional, enterprise, performance, unlimited and developer editions. These rules check for duplicate records using matching rules.
Matching rules in Salesforce can be found at: Data.com Administration > Duplicate Management > Matching Rules. Each matching rule is made up of multiple matching criteria on individual fields. Each matching criteria defines conditions that need to be matched for a specific field. Field comparisons in matching criteria are done using exact or fuzzy matching methods, which use different matching algorithms. Data.com also provides standard matching rules on the standard objects Account, Contact and Lead. While creating duplicate rules, we can use either standard or custom matching rules for an object.
For better understanding on matching rules, refer to Salesforce’s Matching Rule Reference.
Duplicate rules in salesforce can be found at Data.com Administration > Duplicate Management > Duplicate Rules. Once matching rules are activated, users can create new duplicate rules on objects. To create new duplicate rules, users should have Customize Application permission. While creating a new rule, users needs to enter the rule details — including record-level security and field mapping for each field used in selected matching rules. If we want the rule to run for specific records of objects, we can define the entry criteria for the rule.
Once a duplicate rule is set up, it works in 3 steps :
- The criteria used to compare records and identify the possible duplicates are defined by a matching rule.
- Records being saved are identified as duplicates and a list of possible duplicates are returned.
- Duplicate rules will block users from saving possible duplicate records.
Duplicate rules limitations
- Currently, duplicate rules can only be created for Account, Contact, Lead, and custom objects.
- Duplicate rules will not run if:
- Records are created/added using Quick create, Exchange Sync.
- Records are manually merged.
- If records are added using data import tools or Salesforce APIs, and possible duplicates are found, users will always be blocked from saving records and will not see a list of possible duplicates.
- The Fuzzy matching method currently only supports Latin characters.
For more on duplicate rules, please refer to Duplicate Management Overview.