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 test script for the assignCoupon helper. Paste it into the HTML component of a
     Next email and open the preview. Each line prints the result Next gave when the call
     was rendered on its own (expect) next to the result of this run (got).
     Assembled from single-call test emails (dates on the page); it has not been
     run as one email. Calls that make Next fail are listed separately. -->
<p>c1 expect=[gated] got=[{{#if false}}{{assignCoupon "probeCoupons"}}{{/if}}gated]</p>

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.

See also