How does the Voucher Helper Function works?

The voucherPool Helper Function allows you to add Voucher codes in Outgoing messages. Only Vouchers that are uploaded to your ActivatePro platform can be used. For more information on Vouchers, please refer to the Vouchers section.

The syntax of this helper function is:

{{#voucherPool '{"name": [Voucher pool name]}'}}
{{[Voucher pool attribute]}}
{{/voucherPool}}
Property Type Description
name string Required. The name of the of the voucher pool that is accessed.

The voucher pool attributes that may be displayed within a message are the following:

Attribute Description
name Optional. The name of the of the voucher pool that is accessed.
code Required. The voucher code extracted from the voucher pool.
validFrom Optional. The date the voucher is valid from. e.g. 2018-07-14T00:00:00+0000To format this date, please use the date formatting function.
validTo Optional. The date the voucher is valid to e.g.2018-08-25T00:00:00+0000. To format this date, please use the date formatting function.
value Optional. The value or % amount of the voucher. e.g. 10.0.
type Optional. The type of voucher. The types can be eitherpercentage or the same value as the value attribute, depending on how your voucher pool was set up.
currency Optional. The currency of the voucher pool.
minBasket Optional. The minimum basket value that a user must have to be eligible for using a voucher.
conditions Optional. The usage conditions for this voucher.
created Optional. The date the voucher pool was created.
modified Optional. The date the voucher pool was last modified.