In the Bloomreach Engagement platform, if we want to filter customers’ data, we must store it as customer attributes or events/event properties. Redeemed vouchers are no exception to this rule. Let’s look at how to store redeemed vouchers.
How do you save the voucher in a customer’s profile? We can do so using a scenario like this:
It is a simple scenario with an Add event node as its main part. The add event node includes Jinja, who is responsible for assigning an unassigned voucher from a specific voucher pool:
{{ vouchers['RC Vouchers'].assign_available() }}
Now that we know how to store the assigned voucher code, we can further work with it and build different use cases. The most common one is reusing the voucher code.
However, this won’t reliably help us identify whether the voucher code was redeemed. For that, we need to map the voucher in Project settings -> Mapping -> Vouchers:
After that, once a voucher is redeemed, it is automatically set to the redeemed state in the voucher pool:
At the same time, the redeemed voucher will be tracked in the respective purchase event (you can select any event you want and add different other properties), as shown in the screenshot above. You can filter the purchase event with the voucher_code property to filter customers who used a voucher.