Event enhancers
Add Loyalty Engine data to event payloads to enable richer reactor conditions.
Event enhancers let you automatically add internal Loyalty Engine data to an event’s payload when that event is reported. This data is included in addition to whatever external data your system sends.
Use event enhancers when you want to build reactor conditions based on Loyalty Engine context — not just what your system provides.
Why use enhancers?
Without enhancers, you can only build logic based on the data you provide when sending the event. With enhancers, you can include internal platform context to:
Target reactors based on current user state (e.g. audience, tier)
Trigger different outcomes for users with different points balances
Avoid duplicating data in your own system just for event reporting
How to enable
You can add event enhancers when configuring an event type in the Loyalty Console. Once enabled, the selected data will be automatically appended to every event payload of that type.

What data can be added?
The following enhancers add specific properties to the event payload before reactor conditions are evaluated and before duplicate detection is applied:
Audience enhancer
The audience enhancer allows you to add data about a user’s audience memberships to an event’s payload. This enables you to create more targeted reactors by using audience-specific information to determine how a reactor should behave.
Enable the audience enhancer if you want to restrict reactors for the relevant event type to only apply to users who are, or are not, part of a particular audience.
ExampleImagine you’re running a double points promotion for users who joined your loyalty program in the last 30 days. By enabling the audience enhancer on your purchase event type, you can create a reactor that applies double points, but only to users in a “joined in the last 30 days” audience.
The event payload will include a list of audiences the user belongs to before the event is triggered. This allows reactions to consider the user’s pre-event audience memberships.
To learn more about audiences, see Audiences and our tutorial on this: Limit a reactor an audience.
Audience enhancer properties
The following properties are added to an event payload when the audience enhancer is on:
audience
A list of audienceId's of the audiences the user is part of at the moment immediately before the event was reported.
Points enhancer
The points enhancer adds data about a user’s points balance and earning history to an event’s payload. This allows you to build reactors that respond to specific points-related criteria, helping you target users based on their loyalty activity.
You might enable the points enhancer if you want to create reactors that:
Only apply to users who have more or less than a specific points balance.
Trigger for users who have earned, or not earned, a certain number of points within a particular time frame (e.g., day, month, year).
Apply only to users based on their lifetime points earnings.
You could enable the points enhancer on an event type if you wanted to constrain reactors to:
only apply to users who have under or over a specific points balance
only apply to users who earned, or have not earned, a particular number of points in the current or previous day, month or year
only to users who earned, or have not earned, a particular number of points in the lifetime of their loyalty account
ExampleYou could run a double points promotion for users who have earned fewer than 500 points in the current calendar year.
To find out more about points, see Points.
Points enhancer properties
The following properties are added to an event payload when the points enhancer is on:
points
The user’s current points balance immediately before the event is reported. This does not include any points awarded by reactors triggered by the current event.
For example, if the user’s current balance is 1200 points and the event will result in an additional 400 points being awarded by reactors, the balance reported by this data point would still be 1200, as it doesn’t account for the points about to be rewarded.
lastYearPoints
The total points earned by the user in the previous calendar year.
For example, if an event is reported in 2024, this figure would represent the total points earned by the user during 2023.
lastMonthPoints
The total points earned by the user in the previous calendar month.
For example, if an event is reported in February 2024, this figure would represent the total points earned by the user in January 2024.
last24HoursPoints
The total points earned by the user in the 24 hours immediately preceding the event being reported.
For example, if an event is reported at 22:00 on 12 March 2024, this figure would represent the total points earned between 22:00 on 11 March 2024 and 22:00 on 12 March 2024.
currentYearPoints
The total points earned by the user in the current calendar year, excluding any points awarded by reactors triggered by the current event.
For example, if an event is reported on 12 March 2024, this figure would represent the total points earned between 1 January 2024 and the exact date/time the event is reported.
currentMonthPoints
The total points earned by the user in the current calendar month, excluding any points awarded by reactors triggered by the current event.
For example, if an event is reported on 12 March 2024, this figure would represent the total points earned between 1 March 2024 and the exact date/time the event is reported.
userLifetimePoints
The total points ever earned by the user over the lifetime of their loyalty account, excluding any points awarded by reactors triggered by the current event.
Random number enhancer
Adds a random number between 0 - 1 to the event payload, to five decimal places: 0.00000 i.e. 0.75501.
You might enable the random number enhancer if you want to:
Report events and avoid duplicate event detection in almost all cases (there's a 1 in 100,000 chance the random number could be the same, though)
Create reactors that only run based on a chance percentage (i.e. create a reactor condition where the random number must be less than 0.5 to give it a 50% chance of running when an event matching the rest of the conditions is reported)
Random number enhancer properties
The following properties are added to an event payload when the random number enhancer is on:
randomNumber
A random number between 0 - 1 to five decimal places.
Code pool enhancer
The code pool enhancer is automatically applied to the SUBMITTED_CODE event type if you are using the Codes module. This enhancer allows you to create reactors that are limited to specific codes from a defined code pool, based on the code included in the event’s payload.
To find out more about code pools, see Codes. This enhancer is not related to reward code pools.
Code pool enhancer properties
The following properties are added to an event payload when the code pool enhancer is on:
redeemedPoolId
The id of the code pool that the included code is part of.
redeemedPoolName
The name of the code pool that the included code is part of.
Referrals enhancer
The referrals enhancer allows you to create reactors that are triggered only for users whose accounts originated from a referral campaign. This enhancer adds referral-related data to the event’s payload, letting you target users who signed up using a referral link.
You might enable the referrals enhancer if you want to reward users for an event only if they signed up through a referral campaign.
ExampleYou could run a double points promo for users who signed up via a referral code.
To find out more about referral campaigns, see Referrals.
Referrals enhancer properties
The following properties are added to an event payload when the random number enhancer is on:
campaignId
The referral campaign ID the user (whose event this is) is part of through the referral code they used during signup. If this is empty, then the other fields would be empty too since they didn’t sign up via a referral code.
referralId
For internal use.
referralCodeId
For internal use.
isCampaignActive
The status of the referral campaign (true/false) the use signed up with at the time this new event occurs. This can be used to not react to events if the campaign is now inactive.
referralCodeInviteCode
The referral URL used by the user when registering.
referralTrancheStatuses
A collection of statuses of each referral ‘sequence step’ (eg Signup, Make 2 Purchases, etc) completed by this user. This includes the following details:
trancheId: string; // sequence step id activations: number; // number of times sequence completed (for eg, if 1 purchase made out of 2 required purchases, activation would be '1'
isCompleted: boolean; // is the sequence completed? (For eg, false if only 1 purchase is made and we are waiting for the 2nd purchase)
Last updated
Was this helpful?