How do you all deal with vouchers? Ideally we’d like to just create a single Data Extension (DE) with two columns for this:
| voucherCode| used |
| abc | 1 |
| def | 0 |
| ghi | 0 |
| jkl | 0 |
| mno | 0 |
We’ve managed to loop through this DE and display the first voucherCode that has not been used yet to a customer. Unfortunately, we’ve got two issues:
- The same (first unused) voucherCode is displayed to each customer
- We can’t figure out how to update the DE after each email to a customer as opposed to after each email send, which is what is happening now
Examples:
What we have now, using a scenario with 3 customers receiving an email:
- Customer 1, receives ghi
- Customer 2, receives ghi
- Customer 3, receives ghi
- Data extension is updated and used is toggled to “1” for vouchercode “ghi”
What we are trying to achieve:
- Customer 1, receives ghi
- Data extension is updated and used is toggled to “1” for vouchercode “ghi”
- Customer 2, receives jkl
- Data extension is updated and used is toggled to “1” for vouchercode “jkl”
- Customer 3, receives mno
- Data extension is updated and used is toggled to “1” for vouchercode “mno”