To send a specific voucher code in an event-triggered email, especially when a user might be eligible for multiple codes at different times, you can use user tags and dynamic content in your email templates. Here's the recommended approach:
Map Events to Voucher Codes: Determine which events should trigger an email containing a specific voucher code. You'll need a way to associate a particular voucher code with a particular event for a user.
-
Set User Tag with Voucher Code: When the specific event occurs (or just before you trigger the email campaign), use the
/setTags
API method to assign the relevant voucher code to a user tag.- For example, if an event named "completedmilestoneA" should result in voucher "VOUCHER123", you would set a tag for that user with a payload like:
{"milestone_A_voucher": "VOUCHER123"}
- API Documentation:
https://docs.pushwoosh.com/reference/settags
- For example, if an event named "completedmilestoneA" should result in voucher "VOUCHER123", you would set a tag for that user with a payload like:
-
Use Dynamic Content in Email Template: In your email template (e.g., using the Drag and Drop editor or HTML editor), use Liquid templating (or your platform's equivalent for dynamic content) to insert the value of the tag you set.
- For example, if you set a tag named
milestone_A_voucher
, you might use a placeholder like{{ tags.milestone_A_voucher }}
in your email template to display the voucher code. The exact syntax may vary based on your specific Liquid templating setup.
- For example, if you set a tag named
This process ensures that the email dynamically includes the correct voucher code that corresponds to the specific event that triggered the communication.
Comments
0 comments
Please sign in to leave a comment.