In the Bloomreach Engagement platform, if we want to filter customers’ data, we need to store them as either customer attributes or events/event properties. Redeemed vouchers are no exception to this rule. Let’s take a look at how to store redeemed vouchers.
How to save the voucher into a customer’s profile? We can do so using a scenario like this:
A very simple scenario with an Add event node as its main part. The add event node includes Jinja that 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 actually 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 is going to be tracked in the respective purchase event (you can select any event you want and add different other properties as well), as per the screenshot above. You can filter the purchase event with the voucher_code property to filter customers who used a voucher.