# Trigger conditions

Trigger conditions decide when a customisation should run.

Without conditions, the customisation applies to every instance of that event.

## Add trigger conditions

{% stepper %}
{% step %}

### Open the event editor

Open the event you want to customise from the destination **Events** tab.
{% endstep %}

{% step %}

### Create or edit a customisation

Choose the filter, modify, or clone customisation you want to update.
{% endstep %}

{% step %}

### Add each condition

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

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

{% step %}

### Save the customisation

Click **Save** to apply the conditions.
{% endstep %}
{% endstepper %}

## Condition structure

Each condition has three parts:

| Part          | Description                     | Example                |
| ------------- | ------------------------------- | ---------------------- |
| **Field**     | A field path using dot notation | `email`, `app.name`    |
| **Operation** | The comparison to perform       | `is`, `contains`, `>=` |
| **Value**     | The value to compare against    | `test@example.com`     |

## String operations

| Operation       | Description                                |
| --------------- | ------------------------------------------ |
| `is`            | Exact match                                |
| `contains`      | Field includes the value as a substring    |
| `starts with`   | Field begins with the value                |
| `ends with`     | Field ends with the value                  |
| `matches regex` | Field matches a regular expression pattern |

## Numeric operations

| Operation | Description              |
| --------- | ------------------------ |
| `is`      | Exact numeric match      |
| `>=`      | Greater than or equal to |
| `>`       | Greater than             |
| `<=`      | Less than or equal to    |
| `<`       | Less than                |

## Common field paths

| Field path                    | Description                        |
| ----------------------------- | ---------------------------------- |
| `email`                       | Customer email address             |
| `app.name`                    | Shopify app that created the order |
| `properties.total_price`      | Order total                        |
| `properties.financial_status` | Payment status                     |
| `paymentGateways[0]`          | First payment gateway used         |
| `locationId`                  | Shopify location ID                |
| `properties.tags`             | Order tags                         |

## AND vs OR logic

All conditions in one customisation use **AND** logic.

Every condition must pass.

If you need **OR** logic, create separate customisations.

## Conditions on individual mappings

Individual field mappings can also have their own conditions.

Use this for conditional enrichment.

For example, add `paypal_gateway` only when `paymentGateways[0]` is `paypal`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.littledata.io/event-customiser/trigger-conditions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
