---
description: The whitelist and blacklist rules that decide which fields of an imported item an API event stores, the protected system fields, and what _unique_id is.
---

# Field rules

Imported sessions often carry far more than a sign needs — attachments, internal
metadata, personal data. **JSON Import Rules** in Event Settings opens the **Import Field
Rules** dialog, where two lists decide which fields of each imported item are kept. They
run on every sync, after [item filters](item_filters.md) have decided which items are
imported at all.

## The two lists

Both lists are JSON arrays of strings, applied to every imported item:

- **Root Property Whitelist** — when non-empty, only the listed root-level properties are
  kept; everything else is removed before the item is stored. Leave empty to keep all
  properties. Entries are plain root property names — no dot notation or `[]` (use the
  blacklist to reach nested fields).
- **Field Blacklist** — specific fields to remove. Dot notation reaches nested fields, and
  `[]` traverses arrays: `fileData.files[].published` removes `published` from every entry
  of the `files` array. Dot notation is the only form that works — a path written with
  slashes (`speakers/name`, as JSON Pointer would write it) is not a valid rule. And `[]`
  is needed on every array the path reaches *through*: `speakers[].name` removes `name`
  from each speaker, while `speakers.name` is accepted and removes nothing.

The whitelist runs first, then the blacklist — so the blacklist can only remove things
that survived the whitelist, and when a whitelist is active every blacklist entry must
sit under a whitelisted root (the dialog flags orphaned entries). The expandable *"How
these rules are processed"* panel in the dialog previews what your current rules will do.

Both lists are checked when you **save**: an invalid rule (a whitelist entry with dots or
brackets, a blacklist path written with slashes instead of dots, a protected field in the
blacklist, a duplicate, or a blacklist root that isn't whitelisted) is rejected with an
error rather than silently doing nothing on the next sync. Leading and trailing spaces in
an entry are ignored.

**Protected system fields are always kept** regardless of any rule. The import cannot
function without them, so neither list can remove them, and the dialog refuses a blacklist
entry that names one. Which fields those are depends on the event — the dialog shows the
exact list for yours (*Protected system fields (…) are always preserved*), and that list is
the authority. It is built from:

| Protected for | Fields |
| --- | --- |
| Every API event | `title`, `room`, `time_start`, `time_end` |
| Events with Code [room identity](room_identity.md) | the room-code field as well — `room_code`, or `roomId` for RainFocus; in Title mode it can be filtered |
| [Universal API](universal_api_integration.md) events | `_unique_id` (see below) |
| Cvent | `id`, and `room_code` in either identity mode |
| Preseria | `presId` |
| SUBS | `session_id` |
| Swapcard | `id`, `roomSlug`, `roomFieldLabel`, and every field the room is guessed from: `room`, `location`, `stage`, `venue`, `hall`, `theatre`, `auditorium`, `space` |
| RainFocus | `sessionTimeID`, `sessionId`, `status` |

The built-in integrations protect their source's own identifier because they read it on
every sync; a Universal API event does not, for the reason explained next.

`_unique_id` is where the system stores each item's identity. Every sync works out the
item's [Unique ID](universal_api_integration.md#field-mapping) *before* your rules run, then
keeps the result on the item as `_unique_id` — you'll see it in the item's JSON, in the JSON
editor, in import-history comparisons, and through `data-field="_unique_id"` in templates.
Because the ID is already captured by then, **the source field(s) it was built from are not
protected**: whether the Unique ID is a single field (`id`) or a pattern (`{id}-{code}`), you
can whitelist or blacklist `id` and `code` like any other field without affecting item
identity. `_unique_id` is reserved for this purpose: if your upstream data already contains a
field with that name, it is replaced by the Unique ID the system works out, and it is dropped
entirely when the Unique ID cannot be resolved — so identity always comes from the setting you
configured, never from the payload.

Typical uses:

- Drop bulky payload parts templates never use (file attachments, internal metadata), so
  items stay small and the JSON editor stays readable.
- Remove personal data you don't want stored in the signage system
  (`userPersonalData`, `speaker.email`).

Field rules change what is stored, which templates and the
[JSON editor](../events/editing_item_json.md) then see. They take effect for each item the next
time a sync updates it.

## Related

- [Item filters](item_filters.md) — which items are imported at all
- [Universal API](universal_api_integration.md#field-mapping) — where the Unique ID comes from
- [Editing scheduled item JSON](../events/editing_item_json.md) — what the JSON editor shows after the rules
- [URL query parameter overrides](../signs/query_param_overrides.md) — per-sign display tweaks that never touch stored data
