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:
The reactor evaluates the event against its conditions.
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_COMPLETEDevent type and fire on completion. When a mission’s target is reached, aMISSION_COMPLETEDevent 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 theMISSION_COMPLETEDevent — that event, not the individual purchase event, triggers the reactions.
Reactions usually occur almost instantly, though timing may vary slightly depending on server load.
Examples of reactions
Adjusting a member’s points balance
Awarding a badge
Issuing a voucher or gift card
Sending a notification via webhook
Adding reactions
To add a reaction:
Scroll to Reactions and click the empty + block.
Choose a reaction to add and specify reaction-specific detail.
Press Confirm.
Save.

Available reactions
You can add one or more of the following reactions:
Adjust Points

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:
Select Sum All as the calculation type
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)
Leave Max Points Award empty
Press Confirm

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:
Select either Multiply All or Sum All as the calculation type
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.
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)
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.
Press Confirm

Let's take a look at some common variable point adjustment setups:
Award 1 point per £1 spent
Sum all
Event value: order amount
Award 2 points per £1 spent, maximum award 1000 points (shown in GIF above)
Multiply all
Event value: order amount Static number: 2
Award 1 point per £1 plus 100 bonus points
Sum all
Event value: order amount Static number: 100
Deduct 1 point per £1 refunded
Multiply all
Event value: refund amount Static number: -1
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.
To adjust a user's points balance using a custom query:
Select either Multiply All or Sum All as the calculation type
Click Custom Query in the bar above the points field
Click the yellow field to open the query editor
Enter your query and press Done
Press Confirm

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, based on an example event payload. You can adjust the payload data and variables in the expression to see how it affects the result.
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_REWARDandGIVEN_VOUCHERevents 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.

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
subjectThe event type as the
typeThe event id as the
idThe
reportedAttimestamp for the eventThe event payload, including any data from any applicable enhancers, as the
payloadAny 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.

Webhook format
You can use a site like 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.

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.
Last updated
Was this helpful?

