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

> Executes a list of mappers 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>;
};

Executes a list of mappers in sequence. Use this when a single value needs more than one transformation, one after another. The transformations run in the order you add them, and each one works on the result of the one before it. This lets you build a small pipeline in a single step, for example trim the spaces from a product name, then convert it to uppercase.

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

## Fields

<FormField property="mappers" label="Mappers" diType="mapper">
  The list of transformations to run, in the order you add them. The original value goes into the first transformation, its result is passed to the second, and so on, until the last transformation produces the final value. Each entry is another mapper you pick and configure.
</FormField>

## Sample data

| Field   | Value                |
| ------- | -------------------- |
| Mappers | Trim, then Uppercase |

Input:

```json theme={null}
{ "name": "  wool scarf  " }
```

Output:

```json theme={null}
{ "name": "WOOL SCARF" }
```

```json Configuration theme={null}
{
  "prototype": "chain",
  "parameters": {
    "mappers": [
      { "prototype": "string-trim", "parameters": {} },
      { "prototype": "string-upper", "parameters": {} }
    ]
  }
}
```
