---
description: Data Filtering rules that decide which imported sessions an API event keeps — conditions, operators, dot notation, ordering, and how to recover from a rule that skips everything.
---

# Item filters

API events import whatever the source system sends. **Data Filtering** in Event Settings
lets you skip the sessions you do not want on the signs — declined sessions, a track that
has its own screens, test entries — before they are stored. Filters run on every sync,
automatic or manual, on the complete item as the source sent it, before any
[field rule](field_rules.md) removes fields.

## How rules are evaluated

Each rule is a condition plus an action (**Skip** or **Include**). Rules are evaluated
**top to bottom, and the first rule that matches an item decides** — drag rules to
reorder their priority. If no rule matches, the item is imported: Include rules therefore
only make sense as exceptions placed *above* a broader Skip rule (the dialog warns about
Include rules with no Skip below them).

A condition is a field name, a data type, an operator, and a value:

| Data type | Operators | Notes |
|---|---|---|
| String | Equals, Not Equals, Contains | Case-insensitive |
| Numeric | Equals, Not Equals, Greater/Less Than (or Equal) | Decimals use a dot (`10.4`) |
| Boolean | Equals | True/False toggle |
| Null | Equals, Not Equals | Tests whether the field is missing/null; no value needed |

For a **Null** condition, *Equals* matches items where the field is missing or null, and
*Not Equals* matches items where it has a value. For the typed conditions (String, Numeric,
Boolean), an item whose field is missing or null never matches — so a `status Not Equals
"Declined"` rule does **not** match an item that has no `status` field at all.

A typed condition also never matches a field whose value is an **object or a list** rather
than a single value — for example `speakers.speaker` in a feed where that is the list of
speakers. Such a rule is not an error, it just matches nothing; test the individual value you
mean instead (see the note on arrays that follows).

Field names support **dot notation** for nested properties (`speaker.name`). Fields
inside arrays are not supported: a path that continues *through* a list
(`speakers.speaker.featured` when `speakers.speaker` is the list of speakers) is valid
syntax but always reads as "missing", so a Null rule on it matches every item. A path
written with slashes instead of dots (`speaker/name`, as JSON Pointer would write it) is
not valid syntax. This is checked when
you **save**: an invalid field name is rejected with an error explaining the problem,
rather than silently saving a rule that can never match. A rule with an invalid field name
that is nevertheless stored makes the *next* sync fail safely (visible in Import History,
and the event's API is switched off) instead of reading the bad path as "this field is
missing" and deleting the schedule together with a Null/Skip rule — see
[Recovering from an invalid field name](#recovering-from-an-invalid-field-name).

## Example

Import everything except declined sessions, but always keep keynotes:

```
1. Include  if  type    (String)  Equals  "keynote"
2. Skip     if  status  (String)  Equals  "Declined"
```

## Removing items already imported

An item that a Skip rule matches is treated exactly like an item the API stopped
sending: if it was imported by an earlier sync, the **next sync deletes it**, along with
any JSON overrides or template assignment it had. This is intentional — the filter defines
what belongs in the event — but it means adding a Skip rule to a live event cleans up
matching items on the next sync. Custom items created in the web app are never touched by
filters.

## A rule that would remove everything

If the rules skip **every** item the source returned and the event already has imported
items, the sync is refused before changing anything. No item is deleted, and — unlike an
invalid field name — the event's API stays **on**: whether a rule matches everything can
depend on what the source happened to return this time, so the next scheduled poll simply
tries again.

Where to look:

- **Event Details** shows the health as **FAILED** and the reason under **Last Error**, for
  example *"Sync refused: Sync stopped before any change: all 3 fetched items were skipped
  by Data Filtering rule 1 (speakers.speaker.featured, Null, Equals, Skip). Continuing would
  have deleted 3 imported items. Correct or remove the rule in Event Settings > Data
  Filtering Rules; the next sync then runs normally."* The rule number is the priority
  number shown in the dialog.
- **Import History** shows a **Failed** entry with no changes. The entry itself does not
  carry the message; read it from **Last Error**.

To recover, correct or remove the rule in the **Data Filtering Rules** dialog and save. The next
poll — or **Trigger manual API import** — succeeds and health returns to HEALTHY on its
own; there is no API toggle to switch back on. If the source only briefly returned items
the rule happened to match, the same happens without touching the rule. Until one of those,
every poll is refused with the same message and the signs keep showing the last imported
schedule, so treat a FAILED event with a "Sync refused" error as something to act on.

This almost always means the rule tests a field that no item has: a typo, or a path into a
list (see the note on arrays under [How rules are evaluated](#how-rules-are-evaluated)).

Two cases are deliberately not affected: a source that itself returns no items still
empties the schedule as before, and a rule that matches only some items still removes
just those.

If you really do want to remove every imported item, a Skip rule is not the tool, and
neither is deleting the items while the API is still enabled: the next sync reads the
unchanged source and recreates them (the delete dialog warns about this). Either remove
the items from the source system so the next sync deletes them, or first switch the event
to **API Disabled** under **Event Settings → General**, save, and then delete the items
in the event — with polling off nothing brings them back.

## Recovering from an invalid field name

A sync that fails with **"invalid fieldName syntax"** has changed nothing: the check runs
before the import starts, so no items were read, compared or deleted. The failure is
recorded in **Import History**, and because a retry cannot fix a stored rule, the event's
API is switched off — it shows as **API Disabled**.

Recovery takes two saves, in this order:

1. Open the **Data Filtering Rules** dialog from **Event Settings** for the affected event.
2. Find the rule with the invalid field name. The dialog shows the reason underneath the
   field and refuses to save while any rule is still invalid.
3. Either **correct** the field name to a supported dot-notation path (for example `speaker.name`)
   **or delete** the rule. Fields inside arrays are not supported here, so `speaker[].name`
   is not a valid replacement — it is rejected the same way.
4. **Save** the dialog.
5. Go to **Event Settings → General**, switch the **API Disabled** toggle back to **API
   Enabled**, and save. This step is required: saving the filters alone leaves the API off,
   so no further poll would run. Once it is back on, the next poll runs normally.

A sync that stops with **"Sync refused"** (previous section) is different: the API stays on, so
only steps 1–4 apply and the next poll recovers by itself.


## Related

- [Field rules](field_rules.md) — which fields of each kept item are stored
- [Syncing and API health](api_events.md) — the "Sync refused" state a filter can cause
- [Editing scheduled item JSON](../events/editing_item_json.md) — per-item edits after import
