promotion

Assigns and returns one unique, unused code from the Promotion associated with the email send.

object promotion()

Requires a template or campaign with an associated Promotion. The promotion’s vars and a unique code will be returned in an object. To simply display a unique promotion code in your sends, you can place this function in your HTML where you need to display the code.

Examples

Insert a Unique Promotion Code

Once you have created your Promotion and uploaded codes, your template can retrieve it using the promotion() function.

To include the promotion code Zephyr:

Use code {promotion().code} to redeem your discount.


Output:

Use code UA5-E2C to redeem your discount.

To include the promotion code and description stored with the promotion Save the returned promotion object into a Zephyr var. Its code and description can then be displayed in the template.

Zephyr:

{promotion = promotion()}
{promotion.vars.description}
Use code {promotion.code} to redeem your discount.

Output:

Get 15% off all purchases over 50$ before December 18th!
Use code UA5-E2C to redeem your discount.

To access the description, offer, and terms and conditions in Zephyr, use the vars field:

{promotion.code}
{promotion.vars.offer}
{promotion.vars.description}
{promotion.vars.terms_and_conditions}

Contact us

Top