> 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/reactions.md).

# Reactions

Learn how to configure reactions in the Loyalty Engine, including adding and managing reactions like Adjust Points, Give Reward, Award Badge, and custom webhooks.

### What are reactions?

Reactions are the actions that run when a reactor fires — adjusting points, awarding a badge, issuing a reward, or calling a webhook. They are the “what happens” part of your loyalty logic, and they work the same way whether the reactor belongs to a Rule Based campaign or a Goal Based mission.

When an event is reported:

1. The reactor evaluates the event against its conditions.
2. If the conditions are satisfied, the configured reactions are executed.

Where the reactions fire — and what triggers them — differs by campaign type:

* In a **Rule Based campaign**, the reactor is triggered by the **event type itself**. Reactions fire **inline** — every time a qualifying event meets the reactor’s conditions.
* In a **Goal Based campaign**, the mission’s reactions are triggered by the `MISSION_COMPLETED` event type and fire **on completion**. When a mission’s target is reached, a `MISSION_COMPLETED` event is reported, and that event fires the reactions. For example, in a “buy 5 coffees” mission, the 5th qualifying purchase completes the mission and prompts the `MISSION_COMPLETED` event — that event, not the individual purchase event, triggers the reactions.

{% hint style="success" %}
Because completion is handled by the mission itself, reactions are issued automatically — you don’t need to configure separate logic to grant the reward.
{% endhint %}

Reactions usually occur almost instantly, though timing may vary slightly depending on server load.

**Examples of reactions**

* Adjusting a member’s [points balance](/product/loyalty-engine/rewards-and-points/points.md)
* Awarding a [badge](/product/modules/badges.md)
* Issuing a [voucher or gift card](/product/loyalty-engine/rewards-and-points/rewards.md)
* Sending a notification via webhook

***

### Adding reactions

To add a reaction:

1. Create or edit a [reactor](/product/loyalty-engine/campaigns/rule-based-campaigns/reactors.md) or [mission](/product/loyalty-engine/campaigns/goal-based-campaigns/missions.md).
2. Scroll to **Reactions** and click the empty + block.
3. Choose a reaction to add and specify reaction-specific detail.
4. Press **Confirm**.
5. **Save**.

{% hint style="warning" %}
Your changes are not saved until you press ‘Save’ at the bottom of the screen.
{% endhint %}

<figure><img src="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2FlpznQidrGyuiI9sLqhpr%2FSCR-20260828-lwud.jpeg?alt=media&amp;token=641a28bd-d630-4820-93b6-7ea3bb0a85b7" alt=""><figcaption><p>Adding a reaction</p></figcaption></figure>

***

### Available reactions

You can add **one or more** of the following reactions:

{% tabs %}
{% tab title="Adjust Points" %}

## Adjust Points

<figure><img src="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2FV8ZxscUhSNLBgbVlqVOa%2FScreenshot%2016.10.2024%2010.34%402x.png?alt=media&amp;token=c20ab228-44ac-48ba-b3ed-acf9c82e0963" alt="" width="375"><figcaption><p>Adjust Points modal in the Create/Edit Reactor screen</p></figcaption></figure>

The **Adjust Points** reaction allows you to add or remove points from the user's points balance.

Your points adjustment logic can be simple, like adjusting by a **fixed amount** (eg. 100 points for registering) or more advanced, such as awarding a **variable amount** by summing or multiplying different payload values (eg. total transaction value multiplied by 2).

### Fixed points adjustment

To adjust a user's points balance by a fixed amount of points:

1. Select **Sum All** as the *calculation type*
2. Enter the number of points you want to adjust the user's balance by in the *points value* field and press enter
   * *To adjust by a positive amount, enter any figure greater than 0*
   * *To adjust by a negative amount, enter a minus figure (i.e. -500)*
3. Leave *Max Points Award* empty
4. Press **Confirm**

<figure><img src="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2FWc6bon15zuhI1SJjaLmW%2FScreenshot%2016.10.2024%2010.43.gif?alt=media&amp;token=6e8e8204-9b1a-4fa1-b4c3-8dd9aeb75389" alt="" width="375"><figcaption><p>Adjusting by a fixed amount of points (500)</p></figcaption></figure>

### Variable points adjustment

Adjusting a user's points balance by a variable amount of points allows you to tie points adjustment reactions to values in the event's payload. This is useful for programs where you want to award X points per X currency spent (i.e. 1 point per £1 spent)

To adjust a user's points balance by a variable amount of points:

1. Select either **Multiply All** or **Sum All** as the *calculation type*
2. The reactor's trigger event payload values appear above the points field. Click any value you want to use as part of your calculation to insert it into the points value field.
3. Enter the number you want to multiply by or sum with the event value in the *points value* field and press enter.
   * *To adjust by a positive amount, enter any figure greater than 0 (i.e. 1)*
   * *To adjust by a negative amount, enter a minus figure (i.e. -1)*
4. **Max Points Award** allows you to specify a maximum number of points to be awarded regardless of any calculations you configure.
   * *For example: if you set a maximum limit of 500 and configured the reactor to award 1 point per £1 spent, if a user spends £1000 they would only be awarded 500 points.*
5. Press **Confirm**

<figure><img src="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2FsUtmerMe0AwlqVADOvDk%2FScreenshot%2016.10.2024%2010.58.gif?alt=media&amp;token=0f4f92e3-3541-4f3f-8bcf-a04ae5c115a5" alt="" width="375"><figcaption><p>Adjusting by a variable amount of points ($.cost * 2, max 1000 points)</p></figcaption></figure>

Let's take a look at some common variable point adjustment setups:

<table><thead><tr><th width="304">Desired reaction</th><th width="152">Calculation type</th><th>Arguments</th></tr></thead><tbody><tr><td>Award 1 point per £1 spent</td><td>Sum all</td><td>Event value: order amount</td></tr><tr><td>Award 2 points per £1 spent, maximum award 1000 points <em>(shown in GIF above)</em></td><td>Multiply all</td><td><a data-footnote-ref href="#user-content-fn-1">Event value: order amount<br>Static number: 2</a></td></tr><tr><td>Award 1 point per £1 plus 100 bonus points</td><td>Sum all</td><td>Event value: order amount<br>Static number: 100</td></tr><tr><td>Deduct 1 point per £1 refunded</td><td>Multiply all</td><td>Event value: refund amount<br>Static number: -1</td></tr></tbody></table>

OK, so that's the theory - let's take a look in practice at both a sum and multiplication example:

#### Multiply all: Award 2 points per £1 spent, maximum award 1000 points

If Anna Smith spent £600, the order amount value in the payload would be 600 (shown as `$.cost` in the GIF above). The reactor takes this value and **multiplies** it by the static number, **2.** This results in 1200 points – however, as a maximum award of 1000 points has been set, the points adjustment has capped at 1000 points and thus Anna's points adjustment is 1000 points.

#### Sum all: Award 1 points per £1 spent plus 100 bonus points

If Max Jones spent £50, the order amount value in the payload would be 50. The reactor takes this value and the static number, 100, and determines the sum of those values (i.e. adds them together). This means 50 + 100 = 150 points awarded.

### Custom query points adjustment

Writing a custom JSONata query for a points reaction allows you to define advanced, conditional logic to handle complex scenarios. The query operates on the payload data provided with the event that triggered the reactor. You can learn more about JSONata [here](https://docs.jsonata.org/overview.html).

To adjust a user's points balance using a custom query:

1. Select either **Multiply All** or **Sum All** as the *calculation type*
2. Click **Custom Query** in the bar above the points field
3. Click the yellow field to open the query editor
4. Enter your query and press **Done**
5. Press **Confirm**

<div data-full-width="false"><figure><img src="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2FLLhocaMhHHpbC8z0rYVk%2FScreenshot%202025-05-20%20at%2015.12.02.png?alt=media&amp;token=240b6496-caeb-4048-a738-ef1cf44bc21d" alt="" width="375"><figcaption><p>The query editor</p></figcaption></figure></div>

Let's look at a scenario with conditional logic which can be addressed with a custom query:

#### Custom query: Award 10 points per unit, plus 5 bonus points for selected brands and 10 bonus points for spend over £50

If Carl Ward bought 3 units of a product from brand "Coffee Club" at a total line item price of £60, the reactor would calculate reward points using three factors:

* A base rate of 10 points per unit.
* A bonus of 5 points per unit for products from bonus brands like "Coffee Club".
* An extra 10 points for spending more than £50 on a single product line.

Since "Coffee Club" is a bonus brand and the line item total is over the £50 threshold, the calculation would look like this:

* Base: 3 × 10 = 30 points
* Brand bonus: 3 × 5 = 15 points
* Spend bonus: 10 points

In total, 30 + 15 + 10 = **55 points awarded** for this product line.

If multiple products were in the order, the reactor would repeat this calculation for each and add the totals together.

You can see an example of a custom query to address this scenario [here](https://try.jsonata.org/KCdEXshKm), based on an example event payload. You can adjust the payload data and variables in the expression to see how it affects the result.
{% endtab %}

{% tab title="Give Reward" %}

## Give Reward

The **Give Reward** reaction allows you to give any reward which has an associated *benefit* to the user. This includes WLL vouchers and partner gift cards.

When a reward is given as part of a reactor flow:

* The reward is placed in the user's wallet in an unredeemed state
* The cost of the reward is not deducted from the user's wallet
* `PURCHASED_REWARD` and `GIVEN_VOUCHER` events do **not** occur

You can toggle the 'automatically redeem reward' option to have the reward automatically redeem at the same time as it is given to the user.

{% hint style="info" %}
As *offer-type rewards* have no associated *benefit*, they cannot be given as part of a reactor flow. See [Reward types](/product/loyalty-engine/rewards-and-points/rewards/reward-types.md) for more information.
{% endhint %}

<div data-with-frame="true"><figure><img src="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2FnZp8ugdpyxnDnIZlwxbO%2FSCR-20260828-lxbc.jpeg?alt=media&amp;token=4066e94c-ef22-400f-8a9b-0e0c3482af2a" alt=""><figcaption><p>Adding a give reward reaction to a reactor</p></figcaption></figure></div>
{% endtab %}

{% tab title="Award Badge" %}

## Award Badge

The Award Badge reaction allows you to select a badge to be awarded to the user.

<figure><img src="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2FAAgkkp9RvDNSM5iam4mR%2FScreenshot%2017.10.2024%2023.33%402x.png?alt=media&amp;token=4ccd8b0c-d6c2-450d-b266-ac0e4827a751" alt="" width="375"><figcaption><p>Award badge selector in reactor create interface</p></figcaption></figure>
{% endtab %}

{% tab title="Custom webhook" %}

## Custom webhook

You can specify one or more custom webhooks to be sent when a reactor is triggered, along with any headers that should be included in the call.

This allows you to trigger action in systems external to the White Label Loyalty platform - such as updating a data field in your CRM, creating an order in your e-commerce platform, or sending an email via your marketing tool.

WLL will forward the full event which triggered the reactor, including:

* The **user's auth ID** as the `subject`
* The **event type** as the `type`
* The **event id** as the `id`
* The `reportedAt` timestamp for the event
* The **event payload,** including any data from any applicable [enhancers](/product/loyalty-engine/events/event-types/event-enhancers.md), as the `payload`
* Any custom headers specified in the **Headers** field of the webhook reaction itself

You can also choose to pass the full WLL user account details in the webhook content. This returns the full user object in `subject` rather than just the auth ID. Profile information is found at `subject.profile`

If the webhook address you're calling requires authentication you can configure OAuth 2 credentials to be used when making the call.

<figure><img src="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2FK4oXzgmNscIHuKV8FakH%2FScreenshot%202026-08-28%20at%2013.27.02.png?alt=media&amp;token=f629c552-b14e-47d4-ac60-d0902375afa8" alt=""><figcaption></figcaption></figure>

### Webhook format

You can use a site like [webhook.site](https://webhook.site/) to get a test webhook URL to see the exact format White Label Loyalty will send a webhook in for a particular event. Get the test webhook URL, add it to a reactor, and report an event which triggers that reactor against a user. You will see the results on webhook.site.

<figure><img src="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2Fiscxo2VMcJ7pTpPSkbMJ%2FScreenshot%2003.02.2025%2016.25%402x.png?alt=media&amp;token=eceed045-5496-4cc5-9dfe-ca02ebb63f4f" alt=""><figcaption><p>Viewing a webhook sent from WLL in webhook.site</p></figcaption></figure>
{% endtab %}

{% tab title="Marketing webhook" %}

## Marketing webhook

You can select a push notification to be sent to the user when this reactor triggers.

<figure><img src="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2FlTXtl66z8xl4pIIF3qOh%2FSCR-20260828-lxms.jpeg?alt=media&amp;token=8c944751-ce38-4aef-894a-3c53214f358d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
This option is only applicable to customers using our [Loyalty Mobile App](/product/interfaces/white-label-interfaces/loyalty-mobile-app.md). See [Marketing](/product/modules/marketing.md) for more information.

If you have your own mobile app, call your own push notification server with a [custom webhook](#custom-webhook) instead.
{% endhint %}
{% endtab %}
{% endtabs %}

***

## FAQs

#### Can I add multiple reactions to a single reactor?

Yes. You can add more than one reaction, allowing multiple actions (e.g. awarding points and sending a webhook) to occur when a trigger event is reported.

#### Can reactions be conditional within the same reactor?

Both JSONata and JSONPath are supported in Adjust Points reactions. They let you define advanced logic based on the event’s payload.

#### How does the system ensure points are awarded accurately? Are there any checks in place to prevent errors

Points are awarded based on the reactor’s reaction configuration. We recommend using test mode to thoroughly test a configuration before making it live. As an added measure, constrain the campaign to a small audience for a soft launch before opening it to all members, and review the triggering events for the first few days to confirm points attribute as expected. You can see triggered reactors and a summary of their reactions under the ‘Reactions’ tab for a specific event in the Loyalty Console.

[^1]: The event value (let's say £50) is multiplied by 2, equalling 100 points.


---

# 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/reactions.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.
