> ## 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.

# Chain transformers

> Executes a list of data transformers in sequence.

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>;
};

Runs a list of data transformers one after another, passing the result of each step into the next. Use this when you want to group several transformation steps into one and have them apply in a fixed order, for example first setting a status and then building a label from the values you just set. It is also handy as a single building block you can drop into a feature that only lets you pick one transformer but where you actually need several.

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

## Fields

<FormField property="transformers" label="Data transformers" diType="transformer">
  The transformers to run, in order. Each one receives the data exactly as the step before it left it, so later steps can build on the changes earlier steps made. Add as many as you need; they always run from top to bottom.
</FormField>

## Sample data

This example runs two steps in sequence. The first sets a `status`, and the second builds a `label` from values already on the item using the placeholders `&{sku}` and `&{currency}`. See [Placeholders](/references/placeholders) for the placeholder syntax.

| Field             | Value                                                                                |
| ----------------- | ------------------------------------------------------------------------------------ |
| Data transformers | Set values (`status` = `active`), then Set values (`label` = `&{sku} (&{currency})`) |

Input:

```json theme={null}
{
    "sku": "WS-001",
    "price": 100,
    "currency": "EUR"
}
```

Output:

```json theme={null}
{
    "sku": "WS-001",
    "price": 100,
    "currency": "EUR",
    "status": "active",
    "label": "WS-001 (EUR)"
}
```

```json Configuration theme={null}
{
  "prototype": "chain",
  "parameters": {
    "transformers": [
      {
        "prototype": "value-setter",
        "parameters": {
          "configurations": [
            { "key": "status", "value": "active" }
          ]
        }
      },
      {
        "prototype": "value-setter",
        "parameters": {
          "configurations": [
            { "key": "label", "value": "&{sku} (&{currency})" }
          ]
        }
      }
    ]
  }
}
```
