> For the complete documentation index, see [llms.txt](https://help.littledata.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.littledata.io/event-editor/trigger-conditions.md).

# Filter events with trigger conditions

By default, every enabled event fires on every matching interaction. You can use trigger conditions to control when an event is sent to their destination.

{% hint style="info" %}
Trigger conditions let you send an event only under specific conditions, e.g. high-value purchases, or to exclude test orders.

If you want to stop an event completely, you can [disable the event](/event-editor/enable-disable-events.md) instead.
{% endhint %}

### What you can do with it

Filtering events are very helpful for removing noise from the events so your analytics data is cleaner and ad platforms don't optimize their algorithms on the wrong signals.

* **Drop noise** — stop test orders, internal traffic, or QA checkouts from polluting your analytics.
* **Exclude a segment** — keep B2B or wholesale orders out of a consumer-facing ad platform.
* **Isolate a case** — only send renewal orders, or only first orders, to a destination that cares about one of them.
* **Gate by value** — only send orders above a revenue threshold to a high-value audience.

### How a condition works

A trigger condition has three parts:

<table><thead><tr><th width="156.84375">Part</th><th width="339.8828125">Description</th><th>Example</th></tr></thead><tbody><tr><td><strong>Field</strong></td><td>The payload data you're testing for, in dot notation</td><td><code>email</code>, <code>app.name</code></td></tr><tr><td><strong>Operator</strong></td><td>How you're comparing it</td><td><code>equals</code>, <code>contains</code></td></tr><tr><td><strong>Value</strong></td><td>What you're comparing against</td><td><code>test@example.com</code></td></tr></tbody></table>

Read left to right, a condition is a sentence: *send this event only when `email`* *`contains`* *`@littledata.io`* .

{% hint style="info" %}
Not sure what a field is called? The [Tracking schema glossary](/event-editor/glossary.md) lists every field available in the schema.
{% endhint %}

### Add trigger conditions

{% stepper %}
{% step %}

#### Open the event editor

In the destination's [Events tab](/event-editor/getting-started.md), open the **three-dot menu** on the event and select **Edit**.
{% endstep %}

{% step %}

#### Open the Event trigger section

This is where the event's conditions live.
{% endstep %}

{% step %}

#### Add a condition

Select a field, choose an operator, and enter a value.

<figure><img src="/files/v0hXsvpxeRhsi8Y8uvwA" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Save

Click **Save** to apply. The event will now only be sent when the conditions match.
{% endstep %}
{% endstepper %}

### Operators

For text fields:

| Operator         | Description                             |
| ---------------- | --------------------------------------- |
| `equals`         | Exact match                             |
| `does not equal` | Anything except an exact match          |
| `contains`       | Field includes the value as a substring |
| `starts with`    | Field begins with the value             |
| `ends with`      | Field ends with the value               |

Numeric fields support all of the above, plus:

| Operator                | Description              |
| ----------------------- | ------------------------ |
| `greater than`          | Strictly greater         |
| `greater than or equal` | Greater than or equal to |
| `less than`             | Strictly less            |
| `less than or equal`    | Less than or equal to    |

Boolean fields support only `equals` and `does not equal`.

### Combine conditions to narrow the filter

One condition covers simple cases. To describe a more specific slice, stack several and choose how they combine:

* **ALL of the following are true**: every condition must match.\
  Example: Send the event only for subscription orders worth 100 or more.\
  `properties.total_price` `greater than or equal` `100` and `properties.tags` `contains` `subscription`
* **ANY of the following are true**: one match is enough. Use it to widen.\
  Example: Send the event when the order is either tagged *wholesale* or *b2b.*\
  `properties.tags` `contains` `wholesale` or `properties.tags` `contains` `b2b`
