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

# Set the entity schema

> Sets the entity type for the data.

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

Use this step to label every item passing through it with an entity schema. The schema you pick tells the rest of the route what kind of thing each item is, such as a product, an order, or a customer. The item's values are left untouched; only its declared type changes. This is handy when later steps behave differently depending on the entity type, or when you want the data that leaves this route to be clearly identified.

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

## Fields

<FormField property="entityType" label="Entity schema" required diType="entity">
  The entity schema to assign to each item that flows through this step. Every item is tagged with the schema you choose here, so downstream steps and the route's output know what kind of entity they are working with.
</FormField>

## Sample data

This step runs as part of a route and does not change the item's values, so there is no before/after to show. It only assigns the chosen entity schema to each item passing through.

A small example configuration that tags every item as a `product`:

```json Configuration theme={null}
{
  "prototype": "type-setter",
  "parameters": {
    "entityType": "product"
  }
}
```
