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

# Storage: Save item

> Saves data to a storage with an identifier.

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

Saves data into a storage under an identifier you choose, so a later step or run can read it back. Use it to keep a value or a whole record around between steps, to build up a lookup table, or to remember something across runs. If an item with the same identifier already exists, it is overwritten. The data flowing through your transformation is passed along unchanged, so saving never alters the entity you are working with.

This documentation describes: [Schema](/schemas/transformer/storage-save-entity-in-storage)

## Fields

<FormField property="storage" label="Storage" required diType="storage">
  The storage to write the item into. You select a storage that was set up beforehand.
</FormField>

<FormField property="storageKey" label="Storage entity identifier" required>
  The identifier the item is stored under. Reuse the same identifier later to read, update, or remove the item. [Placeholders](/references/placeholders) are supported, so you can build the identifier from the data, for example `&{sku}`. The value must be present and cannot be empty, otherwise the run stops with an error.
</FormField>

<FormField property="source" label="Source">
  The location of the part of your data you want to store. Leave it empty to store the entire entity. To store a single value or a nested section, point at it, for example `customer` or `customer.email`. [Placeholders](/references/placeholders) are supported.
</FormField>

## Sample data

This transformer writes to a configured storage backend and leaves your data unchanged, so there is no fixed before and after to show. The example below stores the whole entity under the identifier taken from its `sku` field. With Source set to `name`, only that single value would be stored under the same identifier instead.

| Field                     | Value                            |
| ------------------------- | -------------------------------- |
| Storage                   | A storage set up beforehand      |
| Storage entity identifier | `&{sku}`                         |
| Source                    | (empty, stores the whole entity) |

```json Configuration theme={null}
{
  "prototype": "storage-save-entity-in-storage",
  "parameters": {
    "storage": { "prototype": "storage", "parameters": {} },
    "storageKey": "&{sku}"
  }
}
```
