Handlebars assignCoupon
Handlebars assignCoupon: reserves a coupon for the current recipient from a coupon list stored in a marketing object and returns that row.
Next
Verification in progress
Test scripts included
Reserves a coupon for the current recipient from a coupon list stored in a marketing object and returns that row. Errors when no coupon can be assigned.
Syntax
{{assignCoupon list}}
Returns object.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
list |
string | Yes | Name of the marketing object holding the coupons. |
Example
Tested in a Marketing Cloud Next email on 2026-11-22:
{{#if false}}{{assignCoupon "MyCoupons"}}{{/if}}is accepted when the email is saved. The branch never runs, so the helper itself is not rendered.
Show Next test script
Marketing Cloud Next
Not runtime-tested in Marketing Cloud Next yet
Accepted when the email is saved, but not rendered yet: it needs a coupon list stored in a marketing object and a real recipient, and every render uses up a coupon. Tested 2026-11-22 by rendering in a Marketing Cloud Next email.