Codes
The Codes module lets you upload unique codes into a pool and reward users when they submit one. Useful for on-pack promos, customer service gestures, and offline campaigns.
What is the Codes module?
The Codes module allows you to create and manage pools of unique codes that can be validated when users submit them through your program.
When a user submits a code:
The Loyalty Engine checks if the code exists in the pool and hasn’t been used.
If valid, a campaign is triggered (e.g., awarding points or issuing a voucher).
The code is marked as used and can’t be redeemed again.
Example use cases
On-pack promotions
Print unique codes on product packaging (e.g., under caps or inside boxes, even on receipts). Users scan or enter them in your app or website to earn points or vouchers.
Customer service gestures
Provide one-off codes via your support team. When entered by the user, the code can trigger a reward such as bonus points.
Campaign rewards
Distribute unique codes via offline marketing (e.g., flyers, inserts at events). Users enter them to unlock loyalty rewards.
Key benefits
Control – Ensure codes can only be used once.
Flexibility – Use codes from any source (packaging, service, campaigns).
Integration – Codes work with existing events and campaigns in the Loyalty Engine.
Using the Codes module
Create an event type
Create a custom event type that will be reported when users submit codes.
In the Loyalty Console, go to Events > Event Types > Create.
Example name:
SUBMITTED_CODE. (Admins can choose something more relevant, e.g.,PURCHASED_PRODUCT)Add a payload schema with a
codeproperty.Turn on the code pool enhancer for this event type. This ensures the Loyalty Engine validates submitted codes against your pools when an event of this type is reported.

Create a campaign
Create a campaign that contains a reactor or mission which will trigger when a code is submitted matching a code from your code pool.
Go to Campaigns > Add a campaign
Configure the campaign as needed. For more information see Creating a Campaign.
Add a reactor or mission. Choose the event type you created earlier (e.g.,
SUBMITTED_CODE) as the trigger.Add a payload condition for 'Code Validity' and choose the relevant code pool the submitted code should be checked against.
Configure any reactions (e.g., award points, issue a voucher).

Test the flow
Report an event of your custom type with a valid code from the pool in the payload.
The reactor or mission should trigger.
The code should be marked as used in the pool.
Try submitting the same code again.
The reactor or mission won’t trigger because the code is already used.
Try a code not in the pool.
The reactor or mission won’t trigger.

Additional notes
You can create multiple code pools (e.g., one per product SKU).
Campaigns can be linked to different pools to run different reactions (e.g., 100 points for SKU A, 200 points for SKU B, bonus voucher for SKU C etc.).
You can edit a code pool at anytime after creating it by opening it in the Loyalty Console and pressing 'Edit' in the top right corner. You can:
Mark a code pool as 'inactive' to prevent any campaigns validating against it to not run.
Top up the code pool with more codes if the pool runs low.
Remove codes from the code pool to prevent them being validated by a campaign.
Last updated
Was this helpful?
