Skip to the content

Creating a Merge+ Rule

Data8 duplicare™ enhances the standard record merging functionality with its own Merge+ Rules. Navigate to Merge+ Rules on the main sitemap and click the “New” button to create a new rule.

The creation of Merge+ rules is split into various tabs: “General”, “Advanced” and “Field Merge Rules”.

Under the “General” tab, enter the entity type (“Entity Name” field). Start to enter the name and an auto-complete pop-up with the available options that match the entered characters will show. Select the correct entity from the list.

The “Advanced” tab has more optional configuration settings for the rule.

  • The optional “Merged Status Reason” option specifies the reason for making the records “Inactive” that are NOT picked as the Merge Master Record. In this box, enter the number for the Status Reason field (statuscode) for the specified Entity. You can find/edit this by going to Settings > Customizations, expand Entities and the entity in question, select “Fields”, find the “statuscode” field, and double click it. Under “Type”, select the status you are looking for and click “Edit”. In the new pop-up window, find the “Value” it will be a number and is the value you need to enter for the “Merged Status Reason”.
    If not specified the “default” value for the “Inactive” status reason is used.
  • Below that is the “Master Selection Rule”. Again this field is
    An “order by” clause that uses our “Expression & Sorts” (see below) and is used to specify the order that the records are sorted to pick out the Master Record (top record after the sort has been applied).
  • The “Show Other Fields” option specifies whether or not users will see an "Others" section in the “Field Merge Rules” screen showing all fields that are not currently on the entity form.

Once the “General” and the “Advanced” sections have been filled out, save the record. This may take some time as several customisations will be made automatically to the selected entity type to enable merging. Once this is complete the fields within the entity will be shown on the “Field Merge Rules” tab to allow you to customise how each one is merged.

Field Merge Rules

The layout that is used is the same as the layout that was applied the last time the chosen entity was viewed. Any fields that are not on the layout will be grouped together in the “Additional Fields” section at the bottom.

Each field can have any number of merge rules applied to it. If none are applied, the value of the field is left unchanged from the master record. To apply a Merge Rule to a field, click the field and modify the “MERGE RULES” in the right side of the window.

The following merge rule types are available (some are only applicable to specific types of fields):

A value (by default, the value from the selected field) is taken from the first record in the list. A different source field can be selected if required.

If used as the first rule for a field, this will take the value from the master record. If used later in the pipeline (see below for details), the original master record may have been filtered out, so this will take the value from whichever record is first in the sort order at that point of the pipeline.

The set of records being merged is analysed to identify the most common value from the specified source field. By default, the source field will be the same as the selected target field but can be changed if necessary.
An optional filter can be applied to the set of records being merged, e.g. to exclude blank values. In this case, only those records matching this filter are analysed.
If there are two or more different values with the same number of occurrences, you can choose to continue to the next rule or to pick an arbitrary winner. If continuing to the next rule, only those records that are part of the potential winning values are passed as candidate records to the next rule.

This rule only applies to text fields. The set of records being merged is analysed to identify the most common values across multiple fields (e.g. Email Address 1, Email Address 2, and Email Address 3). Any blank values are automatically excluded. The Priority setting then identifies which of the values to take, e.g. “1” indicates to take the most common value, “2” to take the second most common etc. When different values occur the same number of times, an arbitrary ordering is applied between them.

This rule only applies to text fields. The value is taken from the specified source field from each record being merged and then concatenated together into a single value. Optionally ensures each value is included only once, where multiple records have the same value, excludes blank values, and can use different separators.

Takes the set of records being merged, optionally applies a filter to it to exclude specific records and then sorts the result. The value is then taken from the specified source field from the record that is first in that sorted list. If two or more records have the same sort order you can choose whether to pick one arbitrarily or continue to the next rule. If continuing to the next rule, only those records that are at the top of the sorted list are passed on to the next rule.

This rule only applies to numeric or money fields. The value is calculated by adding up the value from each record being merged. This is currency aware, so £100 + $150 with an exchange rate of £1 = $1.50 will result in £200 or $300 depending on the currency of the merged record, not £250 or $250.

The merge process can be thought of as a pipeline, with the set of records to be merged being passed from one rule to the next until a rule produces a value. The set of records may be filtered or reordered in each step, which can affect how the next step operates. The following example attempts to demonstrate how this works.


Example Pipeline

The following records are selected for merging:


Created On

Full Name

Email Address 1

Do Not Email



Joe Bloggs




Jo Bloggs




Joe Blogs




Jo Blogs




Joe Bloggs




Jo Blogs



We want to take the best email address from this set of records. The master selection rule is set to “createdon” to prefer the oldest record, so the records will start in the pipeline in the above order.

Filter & Sort is configured with Filter: donotemail = false. This will filter out record #1. As there are still 5 records left that it cannot distinguish between it does not return a value but passes those 5 records on to the next stage in the pipeline.

Use most common value will now look for the most common email address. Although occurs 3 times and only twice in the original set of records, record #1 has been filtered out, so there is a draw. Record #6 is eliminated as only occurs once. Records #2, #3, #4 and #5 are passed on to the next step (preserving the sort order from the previous step).

Use first value from sorted records will now simply take the value from the first record, i.e. record #2.

NOTE: The "Use Master" and "Use first value from sorted records" rules are the same rule, but in different contexts. When used as the first rule in the pipeline, the first record will always be the master record, but in subsequent steps the records could have been re-ordered. If you move this rule up or down the pipeline you'll notice it change name, but the effect is the same.

Expressions and Sorts

Expressions & Sorts use a language called Expressions. This should be familiar to administrators who are used to SQL or CRM’s own calculated fields.

Each expression can reference any of the fields in the records being merged by their logical names – these logical names are shown in the “Take value from” drop down lists for quick reference, but can also be found in the customization areas of CRM.

Common operators can be applied to the values, such as "+ - < > = !=". Literal numeric and string values can be used, with strings enclosed in single quotes.

Filters are a single expression that result in a Boolean (true or false) value. This is typically done with a comparison operator such as “< > = != is is not”, e.g. "emailaddress1 is not null". These can also be combined with “and” and “or”.

Each sort is composed of an expression and a direction, ASC or DESC. Multiple sorts can be combined with commas, e.g. emailaddress1 ASC, createdon DESC. The direction can be omitted, in which case it is assumed to be ASC.

When you enter a sort or expression and leave the field, it is validated and any validation errors are highlighted in red and must be corrected before saving the changes.


Technical Details

If you create a Merge+ Rule for an entity that does not natively support merging (anything other than Accounts, Contacts, Leads and Cases), a new attribute “Merged Into” (logical name data8_masterid) will be created along with a relationship data8_masterid_entityname to relate a merged record to its master.

The ribbon for the selected entity will be customized to add our own merge-related buttons. This will also hide the default Merge button if the entity is one of Accounts, Contacts, Leads or Cases. These ribbon changes will be made in a new unmanaged solution called “DeDupePlus Customizations”.

The new attribute and the ribbon changes are automatically undone when the Merge+ Rule is deactivated or deleted.


Enable QuickMerge

Access to the QuickMerge functionality is controlled by read access to a configuration entity – because of this all system administrators by default will have access to QuickMerge but non-system administrators will not.

To give Quick Merge permissions to a user, they will need the “data8 duplicare™ Quick Merge” security role. Once applied, QuickMerge will become available on the ribbon.

Start a Free 14 Day Trial Today

Register below to start a free trial of our services