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

# Apply entity transformers when conditions are met

> Enables decision-making within data flows by executing other transformers when certain pre-configured conditions are met.

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

Enables decision-making within data flows by executing other transformers when certain pre-configured conditions are met. Use this step to apply a set of transformer steps only to the items that match your conditions, while every other item passes through untouched. For example, you might run extra processing only on orders that are already paid, and leave the rest of the items exactly as they came in.

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

## Fields

<FormField property="filters" label="Filters" diType="filter">
  The conditions that decide which items the transformers run on. An item must match every filter in the list to qualify. Items that do not match are left unchanged and continue through the route as they were. The conditions can be based on the item's own data or on data fetched along the way, so you can branch on values the route has gathered.
</FormField>

<FormField property="transformers" label="Entity transformers" diType="list-transformer">
  The transformer steps to run on the items that match the filters, applied in the order you list them. Items that do not match skip these steps entirely.
</FormField>

## Sample data

This step decides which items to transform as they pass through a route, so it runs as part of a route rather than on its own. A configuration that runs a transformer step only on items that pass a filter looks like this:

| Field               | Value                                             |
| ------------------- | ------------------------------------------------- |
| Filters             | A condition that matches paid orders              |
| Entity transformers | A "Data: Filter items or apply transformers" step |

With this configuration, only the items that match the filter are sent through the listed transformer step. Every other item passes through the route unchanged.

```json Configuration theme={null}
{
  "prototype": "conditional",
  "parameters": {
    "filters": [],
    "transformers": [
      { "prototype": "data", "parameters": { "transformers": [] } }
    ]
  }
}
```
