> For the complete documentation index, see [llms.txt](https://documentation.crossengage.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.crossengage.io/data-and-engagement-platform/messages/vouchers/using-vouchers.md).

# Using Vouchers

You can add a voucher pool to any of your campaign messages, using the **#VoucherPool** Helper Function. To avoid writing code, you can copy the function directly from CrossEngage. The **#VoucherPool** Helper Function has the following syntax:

```jsx
{{#voucherPool '{"name": [Voucher pool name]}'}}
   {{[Voucher pool attribute]}} 
{{/voucherPool}}
```

### Add Vouchers to Messages

Instead of writing a Handlebar expression from scratch, it is possible to obtain the relevant expressions from within the CrossEngage platform.

* Go to **More -> Vouchers**.
* Click on the Voucher Pool you wish to use.

<figure><img src="/files/ms9fZ0Vk2EgI9WwhKFC0" alt=""><figcaption><p>View and edit Voucher Pools</p></figcaption></figure>

* On the right side of the page, you can find Voucher Metadata. Click on the Copy button for **Code** in the Metadata. This will copy the relevant Helper Function.
* Paste this code in your message / template where you wish to display the Voucher Code.
* Similarly, you can also copy additional information , such as the Terms and Conditions of the Voucher, Validity or Discount Value.

{% hint style="info" %}
CrossEngage will automatically remove any Voucher Codes already spent from the Voucher Pool, to ensure it is not sent again to a customer.
{% endhint %}

For more details on adding Vouchers, please go to [Voucher Helper Function](/data-and-engagement-platform/messages/personalization/misc.-helper-functions/voucher-helper-function.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.crossengage.io/data-and-engagement-platform/messages/vouchers/using-vouchers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
