The Microsoft Dynamics CRM Blog
News and views from the Microsoft Dynamics CRM Team

Duplicate Detection Rules Defined

Duplicate Detection Rules Defined

  • Comments 15

In the previous post on the Duplicate Detection Rohit described the power of this feature. In order to use this feature the first step is to define duplicate detection rules. You can define your own criteria upon which you wish to detect the duplicate records in the system. There are two kinds of rules that can be defined:-

1. Single Entity Duplicate detection rule – In this type of rule you can define the criteria of duplicate detection within an entity. For e.g. Contact records are duplicate of each other if they have same value in Email attribute.

2. Cross Entity Duplicate detection rule – Here you can define the criteria of duplicate detection across two entities. For e.g. Account records are duplicate of Lead records if they have same value in Email attribute, i.e. if there is a lead record whose email address matches to some account record, then this lead record will be the duplicate of that account.

To define your custom duplicate detection rule navigate to Settings -> Data Management -> Duplicate Detection Rules area in CRM. You will see the Duplicate Detection Rules grid, where you can do different operations on Rules like create, edit, delete, publish, etc.

The duplicate detection rule form looks like:-

clip_image002

Figure 1: Single Entity Rule (Contacts are duplicate if they have same email address)

Here in the figure 1 I have defined a Single entity rule that ‘Contacts are duplicate if they have same email address.’

For defining a rule you need to specify a base and a matching record type. Base record type is the record type on which you wish to detect the duplicates, while Matching record type is the record type in which you wish to look for duplicates. Hence for a Single entity rule, Base record type and Matching record type will be same, since in that you wish to detect the duplicates within that entity only. In case of a Cross entity rule, like ‘Account records are duplicate of Lead records if they have same phone number’, the Account is the Base record type, since you wish to detect the duplicate accounts, and Lead is a Matching record type since you wish to look for the duplicate records of account in lead. The figure below shows how a Cross entity rule will look like.

For an entity there is a limit of maximum number of rules you can define. By default there can be a maximum of 5 published duplicate detection rules for a particular base record type.

clip_image004

Figure 2: Cross Entity Rule (Account record is duplicate of Lead record if Account’s Main Phone is same as Lead’s Mobile Phone)

Only the entities which have duplicate detection enabled appear in the record type picklist for defining the rules on them. You can enable or disable the duplicate detection for an existing entity or a new custom entity from the Customization Area. Observe in the figure 3, where I have customization form of Account entity opened from the Settings -> Customization -> Customize Entities. There is a checkbox to enable or disable duplicate detection for the entity.

clip_image006

Figure 3: Enabling\Disabling duplicate detection on an entity, via Entity Customization

As can be noticed in the two figure1 and figure2 , apart from the record types you need to specify the rule conditions, which include:-

1. Base Record Attribute – the attribute of the Base record type which you wish to compare to for detecting duplicates. E.g. Main Phone in figure 2.

2. Matching Record Attribute – the attribute of the Matching record type which you wish to compare with (required only in case of Cross entity rule). E.g. Mobile Phone in figure 2

3. Criteria – the criteria used for detecting duplicates. It can Exact Match\Same First Character\Same Last Character

4. No. of Characters – In case the criterion is Same First Character or Same Last Character, you need to specify the number of characters to compare.

There can be multiple such rule conditions in a single rule, as can be seen in figure 1. The maximum number of rule conditions you can define in a rule is limited by the max matchcode length of 450 (the sum of maximum size of the attributes used in the rule condition). This can be determined from the status text in the bottom of the grid. For the rule defined in figure 1 you can see that it says 302/450 (302 in this case being the sum of sizes of E-mail, E-mail Address 2 and E-mail Address 3)

Also you can specify if you wish to perform the data comparison in case sensitive manner or in case insensitive manner, via the checkbox present on the form.

A new rule is always created in an ‘Unpublished’ state, in order to activate that for using you must do ‘Publish’ action on the rule. This can be done via grid or from the option on the form itself.

You can also do the enabling\disabling of duplicate detection at various data entry points into the system. To do this, navigate to Settings -> Data Management -> Duplicate Detection Settings. You will get the dialog as in Figure below.

clip_image008

Figure 4: Duplicate Detection Settings

As can be seen in the figure 4, you can define the options like when you want the duplicate detection to happen. This can be like:-

1. At run time as soon as you create or update a record you wish to be notified of any already existing duplicate record.

2. When you are synchronizing your records created in Outlook offline. This can be further enabled or disabled on the per user basis, from the Tools -> Options settings in the outlook client.

3. When you are importing the records via the Data Import tool.

There will be more blogs with details of each one of these and also lot more things in this wonderful feature in Titan. It’s worth waiting…

Nitin Mukhija

  • PingBack from http://www.bakdevelopment.com/wp/archives/24

  • Interesting point at blogs.msdn.com

  • it's a wonderful article. I've got a question though: does it do "fuzzy match"? i.e. checking for misspellings and etc. for example, "color" and "colour" should be considered at the same word.

  • Welcome to the next in the series of posts on Duplicate Detection in Titan. In case you missed the action

  • Im wondering if you can help.

    Just started playing about with CRM 4 and looking into the duplicate detection functionality. Tried it myself and my Rules when published go into the System Jobs but get set to a status of waiting and postponed until something silly like 30/12/9999.

    I then followed your blog and got the same issue.

    Is there some sort of approval process that when a Duplicate Detection Rule is published the system administrator has to say yes this is ok and publish? Or am i missing something really basic?

    O and for reference i am the System Administrator.

  • Did you ever think about how to maintain high quality data in Microsoft Dynamics CRM when using the Microsoft

  • Did you ever think about how to maintain high quality data in Microsoft Dynamics CRM when using the Microsoft

  • Security model of duplicate detection is in accordance with the security flow of MSCRM v4 which is very

  • Security model of duplicate detection is in accordance with the security flow of MSCRM v4 which is very

  • Security model of duplicate detection is in accordance with the security flow of MSCRM v4 which is very

  • I can't seem to trigger the Duplicate Detection window when creating a contact that SHOULD be detected as a duplicate in CRM.  I created a contact and gave it the exact same First Name, Last Name, and Email Address 1 as an existing contact...

  • My duplicate detection rules keep failing to publish.  What are the top 3 reasons that a dup detection rule would fail to publish?

  • I'd really like to see some improvements to duplicate detection.

    It's particularly annoying to be limited to a match code of 450, especially with Custom entities (we're an ISV).

    Are there any improvements to this in CRM 5.0?

    Thanks,

    LJ

  • What is the maximum size for the rules to be saved in Outlook 2010? I guess till Outlook 2007, the max size is 32KB which is a big restriction on storing number of rules.

    Thanks!

    Virendra

  • Hi ,

    I am trying to Use Duplicate Detection but when I clicked the "new" of  Settings -> Data Management -> duplicate detection rules

    its poping up error like:

    "Error

    Error has occured,

    Try this action Again"

    Can u suggest anything.

    Thanks!

Page 1 of 1 (15 items)
Leave a Comment
  • Please add 2 and 4 and type the answer here:
  • Post