How to put a unique coupon code in a Zendesk macro

By Jake Marsh · Updated

To give each customer their own coupon code from a Zendesk macro, install Vouchwell, create a pool with a key such as late, load your codes, and put [vouchwell:late] in the macro's reply text. When an agent applies the macro, they click Fill codes in the Vouchwell sidebar and the placeholder becomes the next unused code. Turn on Fill macro placeholders automatically to skip the click.

Why a plain macro isn't enough

A macro inserts the same text every time. That works for one shared promo code, but not for single-use codes, where every customer needs a different one and nobody may get a code twice. Vouchwell fills the placeholder from a pool at the moment the macro is used.

Steps

  1. Create the pool. In Vouchwell (left navigation bar), click New pool and set a Key, for example late. The key can't change later, because macros use it.
  2. Write the reply text. In Text put in the reply, use {{code}} for the code, {{expires}} for its expiry date and {{pool}} for the pool name. Example: "Here is 15% off for the wait: {{code}} (valid until {{expires}})". If you leave {{code}} out, the code is added at the end.
  3. Load codes into the pool on the Load codes tab.
  4. Edit your macro. In the macro's comment text, put [vouchwell:late] where the code belongs: "Sorry for the wait. [vouchwell:late]".
  5. Apply the macro on a ticket. The placeholder appears in the reply.
  6. Click Fill codes in the Vouchwell sidebar. Each placeholder gets its own code and the pool's tag is added to the ticket.
  7. Submit the reply as usual.

The three settings that matter

SettingDefaultWhat it does
Fill macro placeholders automaticallyOffFills [vouchwell:pool-key] as soon as a macro puts it in the reply
Stop a save with an unfilled placeholderOnAgents can't submit a reply that still holds a placeholder, so customers never see one
Minutes an agent can release a code60How long an agent can give back a code they inserted by mistake

Find them in Admin Center > Apps and integrations > Apps > Zendesk Support apps > Vouchwell.

More than one code in one macro

Each placeholder gets its own code. A macro with [vouchwell:late] and [vouchwell:giftcard] fills one code from each pool. Two placeholders for the same pool get two different codes. The Codes per ticket limit and the once-per-customer warning are checked when an agent clicks Insert code, so keep a macro to the number of placeholders you want sent.

When the placeholder stays in the reply

  • The key doesn't match. The text after vouchwell: must match an active pool's key exactly. Check the Pools tab.
  • The pool is paused. Agents can hand out codes from this pool is unticked.
  • No codes left. Load more, or check whether the remaining codes have passed their expiry date (Find a code shows a code's status).
  • The agent isn't allowed. The pool is limited to groups or roles the agent isn't in.

With Stop a save with an unfilled placeholder on, Zendesk won't save the reply until the placeholder is filled or removed.

What it costs

Vouchwell is $199 a month per Zendesk account, any number of agents, pools and codes, billed monthly by Zendesk with a 14-day trial. Every setting is in the Vouchwell documentation.

Vouchwell

Voucher and coupon codes from the ticket sidebar, one click each. Never the same code twice. $199 a month per Zendesk account.


Questions

Can a macro generate a new promo code?

Vouchwell doesn't create codes in your store. You load codes you already have, and the macro placeholder takes the next unused one from that pool.

Can two agents get the same code if they apply the macro at once?

No. Each code is locked to one hand-out before it's marked used. If two agents reach for the same code, one keeps it and the other gets the next code automatically.

Do the codes work in messaging tickets?

Vouchwell works in the Agent Workspace reply editor, which custom objects require. The code goes into whatever reply the agent is writing.

What if the agent discards the reply?

The code is already reserved. The agent clicks Release under Codes on this ticket within the release window, and removes it from the reply too.


More Vouchwell guides


More Zendesk guides