Documentation Index
Fetch the complete documentation index at: https://docs.omneo.io/llms.txt
Use this file to discover all available pages before exploring further.
Omneo uses JSON Logic for conditions in reaction filters and claimable benefit eligibility rules. JSON Logic is a small, portable specification for expressing rules as JSON.
Basic syntax
A condition is a JSON object where the key is the operator and the value is an array of operands:
{ "operator": [left, right] }
The { "var": "field_name" } expression reads a value from the event context.
Single condition
Profile’s first name is “Jane”:
{ "===": [{"var": "first_name"}, "Jane"] }
Comparison operators
| Operator | Meaning |
|---|
=== | Strictly equal |
!== | Not equal |
> | Greater than |
>= | Greater than or equal |
< | Less than |
<= | Less than or equal |
in | Value exists in array |
! | Logical NOT |
OR condition
Profile has “tag-1” or “tag-2”:
{
"or": [
{ "in": ["tag-1", {"var": "flattened_tags"}] },
{ "in": ["tag-2", {"var": "flattened_tags"}] }
]
}
AND condition
Birth year before 1980 AND tier is “tier-2”:
{
"and": [
{ "<": [{"var": "birth_year"}, 1980] },
{ "===": [{"var": "tier_handle"}, "tier-2"] }
]
}
12-month spend over $1,000 AND in tier-2:
{
"and": [
{ ">": [{"var": "aggregations.spend_12m"}, 1000] },
{ "===": [{"var": "tier_handle"}, "tier-2"] }
]
}
NOT condition
Exclude profiles with “tag-1”:
{ "!": {"in": ["tag-1", {"var": "flattened_tags"}]} }
Exclude profiles with “tag-1” AND “tag-2”:
{
"and": [
{ "!": {"in": ["tag-1", {"var": "flattened_tags"}]} },
{ "!": {"in": ["tag-2", {"var": "flattened_tags"}]} }
]
}
Available variables
Level 1 — Profile fields (root level)
Accessed as first_name, tier_handle, email, etc.:
| Variable | Type | Example |
|---|
first_name | string | "Jane" |
last_name | string | "Smith" |
email | string | "jane@example.com" |
tier_handle | string | "gold" |
birth_year | integer | 1985 |
birth_month | integer | 9 |
birth_day | integer | 15 |
gender | string | "female" |
flattened_tags | array | ["vip", "stylist-client"] |
flattened_statuses | array | ["active"] |
reward_balance | number | 25.00 |
point_balance | number | 1500 |
joined_at | datetime | "2023-01-15 00:00:00" |
Level 2 — Nested objects
Accessed with dot notation, e.g., aggregations.spend_12m:
| Variable | Type | Description |
|---|
aggregations.spend_12m | number | Spend in last 12 months |
aggregations.spend_all | number | Lifetime spend |
aggregations.spend_atv_12m | number | Average transaction value (12m) |
aggregations.shop_count | integer | Total transaction count |
tier.handle | string | Current tier handle |
tier.name | string | Current tier name |
definition.handle | string | Handle of the triggering definition (tier, benefit, etc.) |
Level 3 — Deeply nested
Accessed as attributes.comms.email_promo, etc.:
| Variable | Type | Description |
|---|
attributes.comms.email_promo | boolean | Email promotional opt-in |
attributes.comms.email_optout | boolean | Email global opt-out |
attributes.comms.sms_promo | boolean | SMS promotional opt-in |
Full JSON Logic reference
For the complete operator reference, see jsonlogic.com. All standard JSON Logic operators are supported.