Vouchers
Vouchers are text codes customers use to redeem discounts or special offers in your online store. You can share these codes through your campaigns—either using the same code for every customer or sending unique codes to each one.
The Vouchers feature lets you load a pool of voucher codes, insert them into campaigns, and track their usage.
Learn how to set up voucher tracking, assign codes in your campaigns with Jinja, and what happens when a pool runs out of codes.
To load codes into a pool, see Import vouchers. To give a customer the same code across campaigns, see Reuse voucher codes.
NoteThe Vouchers feature doesn't replace your voucher system. Your existing system still applies the appropriate discounts when a customer redeems a code.
Import vouchers
Import a pre-generated list of unique voucher codes from any standard data source, and group them into named voucher pools, such as 10%Discount or 100EURoff. Learn how to prepare your codes, run a single or repeated import, and verify the results in Import vouchers.
You can view all your imported voucher pools in Data & Assets > Vouchers.
Set up voucher tracking
Before using vouchers for the first time, make sure you're tracking voucher usage during purchases—including the voucher code itself.
Track vouchers
Go to Project Settings > Mapping > Vouchers and specify where the voucher code is tracked after use. This lets Bloomreach recognize when a specific voucher is redeemed.
For example, if you track voucher codes as an attribute of a purchase event named voucher_code, your mapping should reflect that.

The mapped attribute for tracking redeemed vouchers must be a string.
Personalize vouchers
When setting up your campaign, access vouchers using Jinja. The Personalization wizard can help you generate the correct syntax.

The following Jinja functions are available:
- Assign available code: Selects an available code from the pool, changes its status from available to assigned, and displays it in the campaign.
- Count available codes: Returns the number of currently available codes in a voucher pool. Useful for sending automated alerts when stock runs low.
- Count total codes: Returns the total number of all codes in a voucher pool.
Codes are assigned when the campaign runs. For example, when a weblayer is shown to a customer or an email is sent (including test campaigns). There's no limit to the number of vouchers a customer can be assigned.

Assign available voucher codes
Each time you use vouchers['voucher_xy'].assign_available(), it assigns a voucher code from the pool. By default, it reuses the same code within the same email, SMS, or MMS to the same customer if you call it multiple times.
To display different vouchers to the same customer within a single campaign, set the cached parameter to false.
vouchers['voucher_xy'].assign_available(cached = false)This generates a new voucher for each occurrence within the campaign.
Bloomreach randomly selects voucher codes from the pool. You can't control which codes the algorithm selects.
NoteSetting
cached = falsedoesn't apply in the email preview function. The same voucher appears in the preview regardless. If you usecached = falsein the live campaign, the customer receives a different voucher than the one shown in the preview.
To check if and when a voucher was assigned or redeemed, go to Data & Assets > Vouchers and select the voucher pool.

If you run out of vouchers
Email campaigns
If no voucher codes are available to assign, the campaign fails to send. This generates campaign events with status = enqueue_failed.
Weblayer campaigns
If no voucher codes are available to assign, the weblayer isn't displayed and no events are generated.
Limitations
You can view only the first 1,000 vouchers in Bloomreach platform.
Updated 2 days ago

