---
title: Introduction to the coupon system
slug: campaign/docs/introduction-to-the-coupon-system
docTags: 
createdAt: 2026-07-20T15:45:38.852Z
---

:::hint{type="info"}
**Note**

To enable this feature, contact [customer support](docId\:ZWe1T3UPz3JW6_4mc76qV).
:::

The coupon system lets you:

- Include coupon codes in mailings that recipients may redeem in your web shop.
- Integrate blocks of coupon codes with a placeholder.
- Manually or automatically add coupon codes to a coupon block.
- On request: Display coupon codes as machine-readable bar codes or QR codes.

You can manage the coupon system via the [Optimizely Campaign user interface](docId\:kK8YcYbPDKQi8eNicooAg). You can also manage the coupon system remotely using the following Optimizely Campaign programming interfaces:

- [REST API](https://api.campaign.episerver.net/apidoc/index.html#/Coupon_blocks)
- SOAP API via web services [CouponBlockWebservice](https://world.optimizely.com/documentation/developer-guides/campaign/SOAP-API/couponblockwebservice/) and [CouponCodeWebservice](https://world.optimizely.com/documentation/developer-guides/campaign/SOAP-API/couponcodewebservice/)

## Assigning coupon codes

During dispatch, static or dynamic coupon codes are assigned to the mailings and recipients (MailingToUser ID). This ensures that each coupon code of a coupon block is only sent once.

## Tracking coupon codes sent in a mailing

In the [Manage Coupon Blocks](docId\:kK8YcYbPDKQi8eNicooAg) window, click **Download Assignments** to download the assignment of sent coupon codes in a CSV file. The file contains the

- coupon block ID
- coupon code
- recipient ID (generally, the email address)
- recipient list ID
- mailing ID
- mailing's creation and modification dates

## Inserting coupon codes in a mailing

To send coupon codes in a mailing, insert a placeholder where the code will be displayed. Find the placeholder in the **Details** area of the **Manage Coupon Blocks** window.

```html
{Coupon Block:12345678901}
```

The coupon code is displayed as plain text in the email.

If you want to send several coupons in an email, use several coupon blocks. However, if you insert the same placeholder several times in a mailing, only one coupon code is sent.

## Testing emails

By default, coupon codes in test emails are disabled, and a special placeholder with no function replaces the active coupon code.

To enable real coupon codes for test cases, check the box **Use valid coupon codes in test emails** in the [details](docId\:kK8YcYbPDKQi8eNicooAg) of a coupon block or when [creating](docId\:kK8YcYbPDKQi8eNicooAg) coupon blocks.
