# Set Up Merge Rules

The Merge Rule Configuration feature in DeDupeD enhances deduplication with intelligent, rule-based logic. It allows users to define conditional filters for both master and subordinate records, giving organizations greater control over merge decisions. Instead of depending solely on system-defined logic, administrators can implement custom business rules using FetchXML syntax to automate whether records should be merged, flagged for review, or denied. Additionally, a configurable fallback merge action ensures consistent outcomes by defining a default action (Merge, Review, or Deny) when no rules are met, preventing duplicates from remaining unprocessed.

To configure Merge Rules, follow the steps below:

* Go to **Entity Configuration**
* Navigate to **Merge Settings**
* Drill down to Merge Rule Settings and click on **+ New Merge Rule**

&#x20;

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FwEAeH5qgU7PmuPueqX4a%2Fimage.png?alt=media&#x26;token=af39bcae-8708-4da3-ae85-e5206ae96e66" alt=""><figcaption></figcaption></figure>

The following fields will be part of the Merge Rule entity:

**Name:** Give your rule a clear, unique name so you can easily identify it later. Example: *“High Priority Contact Merge”*.

**Action:** Choose what should happen if the rule conditions are met:

* **Merge –** Automatically merge the records.
* **Review –** Send the records for manual review before merging.
* **Deny –** Block the records from being merged.

**Master Filter Criteria:** Add conditions (using FetchXML) to define what the *main/master* record should look like. Example: “Keep the record where Status = Active.”

**Subordinate Filter Criteria:** Add conditions (using FetchXML) for the *duplicate/subordinate* record. You can also compare fields directly with the master record using the format \[Master:FieldName].&#x20;

Example: “Merge only if the subordinate’s Email = \[Master:Email].”

**Execution Order:** Decide the order in which this rule should run. Rules with lower numbers run first. Example: Set *1* for your most important rule, *2* for the next, and so on.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FsAUhKA06xVeiEFd0QZSx%2Fimage.png?alt=media&#x26;token=e1210fff-e3a4-4508-b51b-08a7798d62f4" alt=""><figcaption></figcaption></figure>

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FW3ILNKLje2Eps7avVOFO%2Fimage.png?alt=media&#x26;token=ada39a12-e77d-4987-afcf-017196899934" alt=""><figcaption></figcaption></figure>

Every created rule will be displayed as below in list format.

&#x20;Fallback Action: In case no rules match, the fallback action defined in the configuration is applied. This fallback action can be:

* Merge – Automatically merge the subordinate into the master.
* Review – Mark the duplicate pair for manual review.
* Deny – Prevent the merge and exclude the pair from further processing.

The fallback behavior (Merge/Review/Deny) is configurable by the administrator through the system configuration or settings entity.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2F1zN3xFyq6US0eGFS1GU8%2Fimage.png?alt=media&#x26;token=cac361d0-7e6e-4343-a42e-166416188607" alt=""><figcaption></figcaption></figure>

The user can select the records for merging as given below:

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2F3OVbb5xGo4uMg2ML8NFm%2F7.png?alt=media&#x26;token=6a87b373-c647-407d-ae89-f13289b6a5e7" alt=""><figcaption></figcaption></figure>

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FTtp5KXpFz8zZOA6sz733%2F8.png?alt=media&#x26;token=232c1f7a-ac90-48cd-b40c-5468df5d378e" alt=""><figcaption></figcaption></figure>

**DeDupeD Job Runs:**

Once the job run is over, it’s result will be stored in DeDupeD Job Runs as given below:

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FADZOuF46eSCbllfyS4yj%2Fimage.png?alt=media&#x26;token=f02fbf64-30c1-4a30-b575-c18c013a63ea" alt=""><figcaption></figcaption></figure>

DeDupeD Job Runs Result:

The Job Results sub-grid will display:

* **Name:** name of the job run record. This usually takes the name of the master record
* **Record URL:** URL of the master record
* **Duplicate Count:** number of total subordinate records
* **Merge Count:** number of merged subordinate records
* **Review Count:** number of subordinate records to be reviewed manually
* **Deny Count:** number of subordinate records that will not be merged
* **Merge Rule Status** -> Auto-Merged, Review, Denied.
* **Merge Status** -> Merging, Merged, Partially Merged, Completed, Pending, Failed.&#x20;

&#x20;      **Merging**- when the merging process is on going

&#x20;     **Merged**- when the merging process is finished and all the subordinate records are merged     &#x20;

&#x20;      **Partially merged**- when the merging process is finished and some of the subordinate records are merged, while the others may be in review/denied/ both

&#x20;      **Completed-** when the merging process is finished and none of the subordinate records are merged and all the subordinates are in denied

&#x20;      **Pending-** when the records are in review

&#x20;      **Failed-** when the merging process is halted mid-way and is not resumed/some error has occurred

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2F6P7QMspNN2ogsTxccV7B%2F10.png?alt=media&#x26;token=27e7c6bc-a9fe-47bf-a123-870fcc4b8ce2" alt=""><figcaption></figcaption></figure>

Results of respective records are displayed as below:

Result showcase for each record,

* Number of records detected as duplicate records
* Number of records got merged
* Number of records under review
* Number of records got denied

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FBY5EC3y8QI0lSY89KQJO%2Fimage.png?alt=media&#x26;token=2863c555-b6ae-45e7-9bc3-9a2912d296e2" alt=""><figcaption></figcaption></figure>

Admin/User can find the selected master record summary in the Master Details tab as given below:

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M0QoyqUVI8_HaZ9FOSL%2Fuploads%2FeeoohekYmRvX0Ro91lnK%2Fimage.png?alt=media&#x26;token=9b9229eb-a00c-4899-ad43-7ad01eddc9b4" alt=""><figcaption></figcaption></figure>

After setting up your merge settings, you'll now have three advanced merge options to choose from: Auto Merge, Field Merge, and Address Merge—each designed to enhance the efficiency of your merging operations.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.inogic.com/deduped/configuration/merge-settings/set-up-merge-rules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
