> ## Documentation Index
> Fetch the complete documentation index at: https://help.owlery.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Advanced Expressions

> Write a tagging rule as a raw JSON expression when the guided condition builder can't express it.

**Where to find it:** `Dashboard → Settings → Tagging Rules → Create Tag Rule → Advanced`

Most people never need this. Advanced mode swaps the condition builder for a raw JSON expression box, for the few cases guided mode can't express — nested filters, counting stops, indexed stops, and rules that predate the guided builder.

Three differences worth knowing:

* **It saves exactly as written, as one rule**, even when several record types are ticked. It doesn't split the way guided mode does.
* **Quotes can only be targeted here.** The Quote checkbox is hidden in guided mode.
* **The expression is validated on save**, both for supported operators and for whether it can actually be evaluated.

An expression is a nested object of `operator` and `operands`. Each operand is either another expression or a typed value — `reference` reads a field off the record, `literal` is a fixed value to compare against:

```json theme={null}
{
  "operator": "==",
  "operands": [
    { "type": "reference", "value": "type" },
    { "type": "literal", "value": "purchase" }
  ]
}
```

Supported operators are `and`, `or`, `==`, `!=`, `>`, `<`, `>=`, `<=`, `contains`, `!contains`, `length`, `filter`, `join`, and `array`.

<Warning>
  `and` and `or` take exactly two operands. Three conditions have to be nested: `and(and(A, B), C)`.
</Warning>

This is the easiest place to build a rule that quietly never matches anything. Email [support@owlery.ai](mailto:support@owlery.ai) and we'll help you write it.
