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

# Filter by storage entities

> Filters items based on whether a corresponding entity exists in storage. Can optionally save new entities to storage for tracking.

Compares each incoming item against a storage you choose, using an identifier you provide. It looks the item up in storage and then decides, based on a condition, whether to let the item through or drop it. By default the condition keeps only items that are **not yet** in storage, which makes this a simple way to skip records you have already seen and process only new ones. When an item is kept it can optionally be saved into storage at the same time, so the next run knows it has been handled.

Use this to avoid processing the same record twice, for example to import only the orders or products you have not imported before.

This documentation describes: [Schema](/schemas/filter/storage-entity-filter)

## Fields

**Storage**

Required

The storage used to look items up and, optionally, to save new ones into. You pick a storage you have already set up.

See the [storage](/references/storage) reference.

**Storage entity identifier**

Required

The key used to find each item in storage. This usually comes from the item itself, so you can use `&{}` placeholders to build it from the data, for example `&{order_id}`. See [Placeholders](/references/placeholders.md).

**Condition**

Required

The rule that decides, after the lookup, whether an item passes the filter. Defaults to keeping items that do not already exist in storage. Other rules let you match the stored entity exactly, or only on certain fields.

See the [storage-condition](/references/storage-condition) reference.

**Save entity to storage**

Optional

When on (the default), an item that passes the filter is automatically saved into storage under its identifier, so it will be recognised on later runs. Turn this off if you only want to read from storage without recording anything.

## Sample data

This filter answers yes or no for each item, so there is no before and after. It relies on a configured storage, which cannot be exercised from a standalone example, so the illustration below is based on the feature's behaviour rather than a recorded run.

With the default condition (keep items that do not already exist) and a storage that already contains an entry for order `10041`:

| Field | Value |
| - | - |
| Storage entity identifier | `&{order_id}` |
| Condition | keep items that do not exist in storage (the default) |
| Save entity to storage | on |

| Incoming item | Result |
| - | - |
| `{ "order_id": "10041", "customer": "Jane Doe" }` | does not match (already in storage, so it is dropped) |
| `{ "order_id": "10042", "customer": "John Smith" }` | matches (new, so it passes and is saved for next time) |

```json Configuration theme={null}
{
  "prototype": "storage-entity-filter",
  "parameters": {
    "storage": "your-storage",
    "storageKey": "&{order_id}",
    "condition": { "prototype": "storage-entity-exists" },
    "store": { "addEntityToStorage": true }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.