> ## 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 input with output

> Merges the transformer output with the input entity.

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Merges the transformer output with the input entity. Use this step when you want to run a transformer step but keep the original item's data alongside its result, instead of replacing it. The chosen step runs on each item, then a template controls how that step's output is combined back with the item it started from, so you can enrich an item with new values while keeping everything it already had.

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

## Fields

<FormField property="step" label="Transformer" required diType="list-transformer">
  The transformer step that runs on each item. Its output is what gets merged back into the original item using the template below.
</FormField>

<FormField property="template" label="Template" required>
  Controls how the step's output is combined with the original input item. It is an expression that builds the merged result; the default `&{@}` takes the whole output. Use it to decide which parts of the input and the output end up in the final item. See [Placeholders](/references/placeholders) for the expression syntax.
</FormField>

## Sample data

This step merges each item with the result of a transformer step as it passes through a route, so it runs as part of a route rather than on its own. A configuration that runs a step and merges its full output back into the original item looks like this:

| Field       | Value                                             |
| ----------- | ------------------------------------------------- |
| Transformer | A "Data: Filter items or apply transformers" step |
| Template    | `&{@}`                                            |

With this configuration, each item is processed by the chosen step and the step's output is merged back into the original item, so the result keeps the input's data together with whatever the step produced.

```json Configuration theme={null}
{
  "prototype": "merger",
  "parameters": {
    "step": { "prototype": "data", "parameters": { "transformers": [] } },
    "template": "&{@}"
  }
}
```
