> For the complete documentation index, see [llms.txt](https://kbase.whitelabel-loyalty.com/product/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kbase.whitelabel-loyalty.com/product/loyalty-engine/campaigns/conditions.md).

# Conditions

Learn how to use conditions in the Loyalty Engine to control when a reactor fires or an event counts toward a mission — based on event payload data, audience membership, and user points history.

Conditions let you control **when** a reactor fires or whether an event counts toward a mission. They give you fine-grained control, so a reactor only reacts — or a mission only advances — when the exact criteria you define are met.

Conditions work the same way in both contexts:

* In a **Rule Based campaign**, conditions decide whether a reactor’s reactions fire for a given event.
* In a **Goal Based campaign**, conditions decide whether a qualifying event counts toward a user’s mission progress.

Conditions can be based on:

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Event data</strong></td><td>Conditions relating to data of the particular event being reported.</td><td><a href="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2FpZcWBC1ytqTdtQBGgZAQ%2Fschool_24dp_5F6368_FILL0_wght400_GRAD0_opsz24%203.png?alt=media&amp;token=4cf93d58-2da3-4ba2-ac0b-874e5bdc6b70">school_24dp_5F6368_FILL0_wght400_GRAD0_opsz24 3.png</a></td><td><a href="/product/loyalty-engine/campaigns/conditions.md#event-specific-conditions">Conditions</a></td></tr><tr><td><strong>Audience data</strong></td><td>Conditions relating to the audience(s) the user reporting the event has joined, left or is a member of.</td><td><a href="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2FfimD38DqCatIVUEdORpK%2Farchitecture_24dp_5F6368_FILL0_wght400_GRAD0_opsz24%203.png?alt=media&amp;token=9f638a43-2e3c-4769-a620-8fe009d387df">architecture_24dp_5F6368_FILL0_wght400_GRAD0_opsz24 3.png</a></td><td><a href="/product/loyalty-engine/campaigns/conditions.md#audience-conditions">Conditions</a></td></tr><tr><td><strong>Points data</strong></td><td>Conditions relating to the points balance or earning history of the user reporting the event.</td><td><a href="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2FIt6tc6CQhKrc7m9NGzgM%2Fcontact_support_24dp_5F6368_FILL0_wght400_GRAD0_opsz24%203.png?alt=media&amp;token=2b38bf16-6c9b-4be7-9d7c-7a7d20ba8992">contact_support_24dp_5F6368_FILL0_wght400_GRAD0_opsz24 3.png</a></td><td><a href="/product/loyalty-engine/campaigns/conditions.md#points-conditions">Conditions</a></td></tr></tbody></table>

<figure><img src="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2Fg4Q1vAc1uwPWny7wvLLt%2FSCR-20260828-lvxp.jpeg?alt=media&amp;token=4d22bc22-5876-4b91-937b-8b2ce485bb7a" alt=""><figcaption><p>Conditions applied to a mission so that only events with the item 'Coffee' count towards the target.</p></figcaption></figure>

***

## Specifying conditions

By default, the Loyalty Console offers a graphical interface (GUI), known as ‘block mode’, to add conditions based on the selected trigger event.

For more complex conditions, or those involving properties not defined in the event type’s schema, you can switch to JSON input to configure them manually. Conditions must be specified using JSON Schema Draft 6.

{% hint style="warning" %}
Once you’ve entered custom JSON in a configuration, you cannot return to block mode unless you remove the complex conditions.
{% endhint %}

***

## Event-specific conditions

Event-specific conditions tailor behaviour based on details specific to the trigger event, using data directly from the event payload.

Here are some examples of conditions you might expect with common events:

* **Transaction events** — total number of line items purchased, specific SKUs purchased, total amount spent, retail location, retail channel (e.g. online, in-store).
* **Survey/quiz events** — which questions were answered, percentage completed, whether the survey was abandoned or completed, ratings given, score.
* **Promo code submission events** — the code that was submitted.
* **New subscription events** — the selected plan, subscription term, whether it’s a new subscription or a renewal.

To use any of these data points as a condition, they must be included in the event payload and defined in the event type’s schema.

{% hint style="info" %}
Remember, custom event types and their associated conditions are defined by you. It’s up to you to decide which customer behaviours you want to reward, determine the source of your event data, create custom event types with the appropriate payload schemas, and send these events to the Loyalty Engine via API. For more information, see [Event types](/product/loyalty-engine/events/event-types.md).
{% endhint %}

<details>

<summary>Event-specific conditions use case examples</summary>

* Only fire a reactor when a transaction exceeds £100.
* Only count purchases over £20 toward a spending mission.
* Award bonus points when a purchase includes specific product SKUs.
* Trigger a reward only when a user signs up for an annual subscription plan.

</details>

***

## Audience conditions

Audience conditions relate to the audiences the user associated with an event is in. There are two types: **user in audience** and **specific audience joined / left**.

### User in audience

The *user in audience* condition lets you choose one or more audiences the user must be a member of for the reactor to fire or the mission to advance.

This condition is available for any event type when you enable the [**Audiences event enhancer**](/product/loyalty-engine/events/event-types/event-enhancers.md#audiences) in the event type’s configuration. It’s essential for targeted campaigns where you want logic to apply only to specific segments of users. See [Audiences](/product/loyalty-engine/audiences.md) for more information.

{% hint style="info" %}
When using the Audiences event enhancer, the event being reported is enriched with the audiences that user was in **before** the event occurred. It does not take into account any audience changes that may occur as a result of that event being reported.
{% endhint %}

<figure><img src="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2FjQXFPlpOFv1Lrx0RWNHO%2FSCR-20260828-lwis.jpeg?alt=media&amp;token=eed2dc3c-e154-4003-8eb6-1682c34a5ef3" alt=""><figcaption></figcaption></figure>

### Specific audience joined / left

The *specific audience joined / left* condition is exclusive to configurations where the trigger is one of the [**Audience Joined / Left** event types](/product/loyalty-engine/audiences/audience-joined-and-left-events.md). It lets you specify the audience the user must have joined or left.

{% hint style="info" %}
The key difference: *user in audience* checks membership at the time the event is processed, while *specific audience joined / left* is based on the user’s action of joining or leaving a particular audience.

One is for general targeting, the other for membership changes.
{% endhint %}

<details>

<summary>Audience condition use case examples</summary>

* *User in audience* — award VIP members a bonus when they make a purchase; run promotions for users in a certain region (e.g. double points for UK-based users during holidays).
* *Specific audience joined / left* — reward users when they join a “High Spenders” audience after hitting 1,000 points; re-engage users who leave the “Frequent Buyers” audience with a win-back offer.

</details>

***

## Points conditions

Points conditions let you control behaviour based on a user’s points balance or earning history. For example, you can target users based on current balance or points earned in a given time period. This data is added to the event by the [**points event enhancer**](/product/loyalty-engine/events/event-types/event-enhancers.md#points).

#### Example use cases

* Only fire a reactor when a user makes a purchase **and** has over 5,000 points.
* Only count an event toward a mission when the user has earned less than 1,000 points in the current calendar month.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://kbase.whitelabel-loyalty.com/product/loyalty-engine/campaigns/conditions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
