Sunday, March 15, 2015

Data.com Duplicate Management

Preventing users to create duplicate records is definitely important and takes vital role in every organisation's data. Salesforce introduced a new feature "Data.com Duplicate Management" with its Winter '15 release as a Beta program and with Spring '15 release Salesforce has made this feature GA (Globally Available) due to its high demand by customers.

It gives Users ability to:
  • Block users to create duplicate records.
  • Ignore duplicates and create duplicate records.
  • Create Reports of those duplicates which are ignored.
Note:
  • It only available in Professional and higher Salesforce editions (e.g. Enterprise, Performance, Unlimited, and Developer editions).
  • It uses Data.com technology, but does not require a Data.com license.

Let's take an example: We usually have a requirement where we need to enforce users to NOT create multiple Contact records with the same Email address.

Let's use this Data.com Duplicate Management feature to achieve this.


Step 1: Create a Matching Rule


What are Matching Rules?
Matching Rules compare field values to determine whether a record is similar to existing records to be considered a duplicate record.

For example, a matching rule can specify that if the Email and Phone values of two records match exactly, the records might be duplicates.

You can follow steps mentioned here to create a Matching Rule to check Email field on Contact object.

Your configuration should look like as below:















Step 2: Create a Duplicate Rule


What are Duplicate Rules?
Duplicate rules tell Salesforce what action to take when duplicates are identified.

For example:
  • A duplicate rule can block users from saving records that have been identified as possible duplicates
  • A duplicate rule can alert users that they may be creating a duplicate, but allow them to save the record anyway.
You can follow steps mentioned here to create a Duplicate Rule for Email field on Contact object.

Your configuration should look like as below:




























Note: Do not forget to Activate both a Matching Rule and a Duplicate Rule.

Step 3: Let's Test these Rules

  • Create a new Contact record with the Email Address populated.
  • Create another Contact record with the Email Address you used earlier.
  • You should be blocked to create a new Contact record with the Email address which already exists.
















Here now User is unable to create duplicate Contact record. That's good but now User will not be able to do any further action for this Contact.

Sometimes you actually want to alert Users and but also allow them to create duplicate records so they can perform further actions to won the deal.

Let's make some changes in "Duplicate Rule" configuration. Your configuration now should look like as below:




















Step 4: Let's Try this updated Duplicate Rule

  • Create a new Contact record with the Email Address populated.
  • Create another Contact record with the Email Address you used earlier.
















See the difference previously you did not have option to Ignore duplicate Alerts. But now you should be blocked BUT you have options to create a new Contact record with the Email address which already exists.

Limitations:
1) It is available for Leads, Accounts, Contacts, and Custom objects.
2) It does not work with Person Accounts, Opportunities and all other objects.
3) Duplicate rules don’t run when records are created in following ways.

  • When records are created using Quick Create.
  • When leads are converted to accounts or contacts and your organisation doesn’t have the “Use Apex Lead Convert” permission.
  • When a record is restored with the Undelete button.
  • When records are added using Exchange Sync.
  • When records are manually merged.

4) In some cases, if duplicate rules are set for an alert to show when potential duplicates are found, users will always be blocked from saving records and will not see a list of possible duplicates. Examples of this include the following.

  • When records are added using the data import tools.
  • When a person account is converted to a business account (and the newly created business account matches existing business accounts).
  • When records are added or edited using Salesforce APIs.

See further details for Duplicate Management Limitations