> ## Documentation Index
> Fetch the complete documentation index at: https://doc.qbilon.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Merger

> Configure a Custom Merger to consolidate matching assets.

[YouTube video player](https://www.youtube.com/embed/Ixq58Oaj25o)

## General

With the customizable merger, it is possible to merge specific assets according to individual requirements.

This is mainly used in order to unite scattered information on specific asset instances in a single representation. This is especially useful when relevant information is coming from multiple data sources.

## Creating Custom Mergers

Just follow these steps in order to create your own mergers:

1. Select the two asset types to be merged: "Merge \[Asset Type] with \[Asset Type]" (e.g., "Merge Server with Server").
2. Select the assets' properties to be used for merging these two asset types: "when \[Property] \[Operator] \[Property]" (e.g., "when ID equals ID"). By clicking on `+ Add Constraint`, further constraints can be added, which can be linked with `OR` or `AND`. Clicking on the delete icon deletes a specific constraint.
3. Setting the value for "Target Type (after merging)" defines the resulting asset type after merging two assets (e.g. "Server").
4. In order to deal with missing data (e.g., assets without a "name" attribute), the `Name Property` section allows to specify further properties that are used as `Name Property` for the resulting (merged) asset, e.g., "datasourceId" or "qbilonID".
5. When two assets have different values for one specific property (e.g. different department assignments), the selected `Merge Strategy` defines which values is used in such a conflicting case: the oldest value, the newest value or the value originating from a specific data source (e.g. PRTG). In the latter case, users can define a descending order of data sources to be used. In addition, it is possible to select an own merge strategy for specific asset properties (`+ Add Merge Strategy`).

![Custom Merger: Creating Custom Mergers](https://mintcdn.com/qbilon-docs/Jmla3tEw4FRYjkNT/.gitbook/assets/6d2f9197-594d-4e7d-9117-c7d3c9c9d9b0-screenshot-2026-10-06-172354.png?fit=max\&auto=format\&n=Jmla3tEw4FRYjkNT\&q=85\&s=6a41b75c7457d9e8f24ce656d9f68af5)

Configured merger that combines all "Devices" with matching host names and IP addresses.

## Custom Merger Example

In the following a "before and after example" of a merger process is shown.

We intend to merge all "Devices" with the same name. Thus, the configuration is simpler compared to the screenshot above: Now, we only define one merge condition – "Name equals Name" – instead of two.

Before running the custom merger, the diagram looks like this including two "Devices" with the same name (blue assets):

![Custom Merger: Custom Merger Example](https://mintcdn.com/qbilon-docs/Jmla3tEw4FRYjkNT/.gitbook/assets/6a579e80-66c3-41f1-91cd-92b8e25a03c1-screenshot-2024-10-14-172154.png?fit=max\&auto=format\&n=Jmla3tEw4FRYjkNT\&q=85\&s=2e44d9716ae63fdc9b700c0d1f12cca4)

Diagram before running the merger

When the merger is executed, it merges the two asset instances `F-Dev_Exchange` as they have equal `Name` properties. The resulting diagram now looks like this:

![Custom Merger: Custom Merger Example](https://mintcdn.com/qbilon-docs/Jmla3tEw4FRYjkNT/.gitbook/assets/757b97a1-b716-4d61-aff0-31fb6cea65ba-screenshot-2024-10-14-172614.png?fit=max\&auto=format\&n=Jmla3tEw4FRYjkNT\&q=85\&s=7ca4aef3ff552c56c9cfc5c44c3274dc)

Diagram after running the merger

## Known Limitations

Merging fuses multiple assets (along with all their properties) into a single asset. Applying this mechanism to assets that originate from the same data source can result in unintended update behavior.

**Example**
A user imports data from data source `DS1` and merges assets of type `A` with assets of type `B` into a new type `C` . Suppose the custom merger works as intended, processing two assets (one of each asset type) and "producing" 1 asset of type `C` as a result.

When `DS1` is run again, the original assets – one of type `A` and one of type `B` – are no longer available for updating because they have previously been merged into a single type `C` asset.

So for each incoming asset, the original ID is no longer found in Qbilon's database anymore because the assets have been merged in the meantime. Instead, the pre-processing identifies the asset with ID `1` (and type `C`) as the "relevant" asset to update for **both** incoming assets. Technically, this is correct, as both assets contribute to this type `C` merge result with ID `1`.

However, a next step during the pre-processing is to eliminate incoming assets with non-unique (conflicting) IDs in order to avoid non-deterministic results: As a consequence, all assets that have been merged using such a "data source-internal" merger are skipped and will never receive updates.

The following table illustrates how the pre-processing for this example looks like:

| **Original** **asset type** | **Original** **asset ID** | **Asset type** **after merging** | **Asset ID** **after merging** |
| - | - | - | - |
| A | 1 | C | 1 |
| B | 2 | C | 1 |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.