17 June 2016

Creating Matching and Duplicate Rules w/ Native Duplicate Management Features

I just updated the Matching and Duplicate Rules in our Salesforce org so I thought I'd post about how it was originally set up and the small changes I recently made.

We have a duplicate data issue.  Currently support reps think nothing of creating duplicate or incomplete contact and account records to fulfill their cases.  Case creation and tracking is just a tool to count activity.  It's not used to provide feedback to the product team for feature enhancement, nor the sales team for more intelligent onsite conversations with customers.    I'm looking to change this.

When I started here there was a little-used app called DupeCatcher.  I hadn't heard of it so, before uninstalling I wanted to check out the product.  Turns out a lot of the functionality (a lot of the functionality we used anyway) was in the native 'Duplicate Management' features of Salesforce.   So I decided to scrap DupeCatcher and build out the Salesforce settings instead.  If anyone using DupeCatcher wants to post about the product's enhancements, please do.

Here's a good summary of Duplicate Management 

First...  Create your Duplicate Rules.   Here are mine.


Only Account and Contact Dupe Rules are active.

For our Accounts in the US with Bank as the type we map them to their FDIC numbers.
So, I've created rules to not allow duplicate FDICs, CCIDs (unique fields from an external database) and, recently, Account Name.
We do have accounts with the same name however I think it'll do more good than bad to not allow creation of the same account name twice anymore.  More often than not the account created with the same name is a duplicate as opposed to another account with the same name.  Example; First Southern Bank.  There are definitely a few of these in the country but most of the bank with this issue are already in Salesforce.



One of the recent changes I made was to block any duplicate account creation.   You can choose to allow the rep to Save the new account and ignore the notification of the duplicate account.  I took away that option since there should be absolutely no duplicate FDIC numbers or CCIDs.


I'd suggest doing this in your org too if you haven't already.   Even as I post this I think to myself, of course I should've enabled this in the first place.

Next I'll see if the fuzzy logic on the Contact Name will suffice.



With these criteria users can try to create a contact named Rich Higgins on a specific account and Salesforce will block it if Richard Higgins exists.

If you have any suggestions on keeping data clean beyond these duplicate rules I'm all ears.



From the Salesforce help pages.

Create or Edit Duplicate Rules | Salesforce

Create or Edit Duplicate Rules


Use duplicate rules to define what happens when a user tries to save a duplicate record.
Available in: Salesforce Classic and Lightning Experience
Available in: Professional, Enterprise, Performance, Unlimited, and Developer Editions
User Permissions Needed
To create, edit, or delete duplicate rules:“Customize Application”
To activate and deactivate duplicate rules:“Customize Application”
To view duplicate rules:“View Setup and Configuration”
In order for users to see the list of possible duplicates detected by the duplicate rule, they must have read access to the object defined in the rule.
  1. From Setup, enter Duplicate Rules in the Quick Find box, then select Duplicate Rules.
  2. To edit an existing rule, click the rule name, then click Edit. To create a new rule, click New Rule , then select the object you want the rule to apply to.
  3. Enter the rule details, including the rule’s name, description, and record-level security settings.
  4. Select which action will occur when a user tries to save a duplicate record.
    If the action includes an alert to users, we’ll provide default alert text that you can customize. Only the Allow action includes the report option.
  5. In the Matching Rules section, first select the object that records will be compared with. Then select which matching rule will determine how records are identified as duplicates.
    The list includes all available matching rules for the selected object. If none of the matching rules in the list are what you want, select Create New Matching Rule.
    Tip
    We recommend you use the standard matching rules because they’ve been carefully designed to return the best possible set of match candidates. Just be sure you’ve activated them.
    If, however, you decide to create a new matching rule, we recommend you first finish creating your duplicate rule. Then create and activate the new matching rule. When you come back to the duplicate rule, it will automatically have the newly created matching rule associated it, as long as it didn’t already have an associated matching rule.
  6. Make sure you’ve selected the field mapping for each matching rule, if needed.
    If the matching rule is comparing records from two different objects or uses custom fields:
    • You’ll need to decide how you want the fields from the first object to be compared to the fields from the second object. For example, you might map a custom field called Work Email to the standard Email field.
    • Some data may be truncated prior to matching two text fields with different maximum lengths.
  7. If you want your duplicate rule to run only if specific conditions are met, specify the conditions.
    For example, you could add a condition that tells the rule to run only if the record was entered by a user with a certain profile or role, or if the record includes a specific country or state.
  8. Save the rule.
  9. Activate the rule.
    For the activation to succeed, all associated matching rules must be active.
  10. If you have more than one active duplicate rule for a particular object, you may want to adjust the order in which the rules are processed. You can reorder rules by clicking Reorder from any rule’s detail page.
    Tip
    If the first duplicate rule finds a match for a particular record, that record will not be evaluated by subsequent duplicate rules. Therefore, you should order your duplicate rule so that rules with the Block action are run before rules with the Allow action.




Create or Edit Custom Matching Rules


Use matching rules to determine how two records are compared and identified as duplicates.
Available in: Salesforce Classic and Lightning Experience
Available in: Professional, Enterprise, Performance, Unlimited, and Developer Editions
User Permissions Needed
To create, edit, or delete matching rules:“Customize Application”
To activate and deactivate matching rules:“Customize Application”
To view matching rules:“View Setup and Configuration”
  1. From Setup, enter Matching Rules in the Quick Find box, then select Matching Rules.
  2. If editing an existing matching rule, make sure the rule is inactive.
  3. Click New Rule or Edit next to the existing rule you want to edit.
  4. Select which object this matching rule will apply to.
  5. Enter a name and description for the rule.
  6. Enter the matching criteria.
    The matching criteria is where you define which fields to compare and how. To add additional fields (up to 10 total) click Add Filter Logic... and then Add Row.
  7. If you need to adjust the matching equation, click Add Filter Logic.... Here you can, for example, manually change an AND expression to an OR expression.
  8. Save the rule.
  9. Activate the rule.
    The activation process may take some time, so we’ll send you an email when the process is complete and your matching rule is ready to use.
After the matching rule is active, it’s available to use with other Data.com Duplicate Management tools. For example, using a matching rule with a duplicate rule tells Salesforce to take certain actions when users try to save a record the matching rule has identified as a duplicate.