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

# Merge transformer output

> Combines the output of a transformer with the existing data.

Runs another transformer and then blends its result back into your original data, using a template you control. Some transformers replace the whole entity, which would lose the data you started with; this transformer keeps that from happening by layering the new result on top of what was already there. Use it to capture a result, such as a computed field or a response from an external call, while keeping the rest of the entity intact.

This documentation describes: [Schema](/schemas/transformer/merger)

## Fields

**Data transformer**

Required

The transformer to run. It runs against the current data, and its result is what gets merged back in through the template.

See the [transformer](/references/transformer) reference.

**Template**

Required

Describes the shape that gets layered on top of your original data. Build the structure you want here, using placeholders to pull in the transformer's result: `&{some_field}` inserts a single value from it, and `&{@}` inserts its entire output. Whatever you build is merged into the original entity, so existing fields stay unless your template writes over them. See [Placeholders](/references/placeholders) for the syntax.

## Sample data

In this example the chosen transformer adds a `currency` field, and the template uses both the original `price` and that new `currency` to build a nested `pricing` block. The original fields are kept, and the `pricing` block is added on top.

| Field | Value |
| - | - |
| Data transformer | Set values: `currency` = `EUR` |
| Template | `{ "pricing": { "amount": "&{price}", "currency": "&{currency}" } }` |

Input:

```json theme={null}
{
    "sku": "A-100",
    "price": 19.99
}
```

Output:

```json theme={null}
{
    "sku": "A-100",
    "price": 19.99,
    "currency": "EUR",
    "pricing": {
        "amount": 19.99,
        "currency": "EUR"
    }
}
```

```json Configuration theme={null}
{
  "prototype": "merger",
  "parameters": {
    "transformer": {
      "prototype": "value-setter",
      "parameters": {
        "configurations": [
          { "key": "currency", "value": "EUR" }
        ]
      }
    },
    "template": { "pricing": { "amount": "&{price}", "currency": "&{currency}" } }
  }
}
```


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