# How to connect Batch to Voucherify?

Voucherify is an API-first Promotion and Loyalty Engine that helps enterprise brands build and manage personalized promo codes, gift cards, auto-applied promotions, loyalty programs, and referral campaigns.

A connection has been developed to allow our customers to add voucher codes generated by Voucherify to their Batch messages.

Here is how to set up and use the connection:

{% hint style="danger" %}
**Pre-requisite:** The user IDs selected in Voucherify need to be of the same type as the Custom User ID you have for your Batch apps/website.
{% endhint %}

## 1. Connection setup & Distribution creation <a href="#h_42d6b0725e" id="h_42d6b0725e"></a>

Follow the [instructions from the Voucherify documentation](https://support.voucherify.io/article/614-batch-integration) to activate the connection and create a voucher code distribution.

## 2. Use the coupon codes in Batch campaigns <a href="#h_a5cda485ec" id="h_a5cda485ec"></a>

### a. Attributes activation <a href="#h_42852e7d34" id="h_42852e7d34"></a>

Once the distribution is activated in Voucherify, the corresponding custom attributes will be visible on the Batch dashboard, under **Profiles > Custom Data**:

<figure><img src="https://2998247023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbwlQFpRAhaFR79zae6Jf%2Fuploads%2FZpvyWud36U1rJIRt2kWd%2Fintegrations_voucherify_custom_data_180425.png?alt=media&#x26;token=e930f376-b7be-41bd-adaa-7ae9a245f877" alt="Screenshot of the Custom Data section on the Batch dashboard showing the toggles to be used to activate or deactivate custom attributes"><figcaption></figcaption></figure>

You need to activate the necessary attributes by clicking the **toggle** on the left of each attribute, and then clicking **"Save"** on the right.

### b. Create your campaign <a href="#h_f351a4d890" id="h_f351a4d890"></a>

You can use the attributes coming from Voucherify to personalize your messages in Batch just like any other custom attribute.

\
Here is an example of a one-shot push campaign:

#### Targeting <a href="#h_4581deadfe" id="h_4581deadfe"></a>

In this example, we assume that the voucher codes in Voucherify have been assigned to a pre-defined list of users.

In this case, you need to:

* Import this list into Batch as an Audience (see how to do this in our [Audience management documentation](https://app.gitbook.com/s/UIK868wiiK9XOVyETGZS/features/customer-engagement-platform/profiles/audiences))
* Select this audience as the target of your campaign:

<figure><img src="https://2998247023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbwlQFpRAhaFR79zae6Jf%2Fuploads%2FK60aFGLmMdSykumWuQ1n%2FScreenshot%202025-04-18%20at%2016.48.11.png?alt=media&#x26;token=70ff0533-7351-4e20-939f-6bd83e0d5dde" alt="Screenshot of the targeting block in a Batch Campaign creation form"><figcaption></figcaption></figure>

#### Push content <a href="#h_84179a0edd" id="h_84179a0edd"></a>

Then, include the voucher code in your message:

<figure><img src="https://2998247023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbwlQFpRAhaFR79zae6Jf%2Fuploads%2F95iS9K1hjFvibfKU1pWv%2Fintegrations_voucherify_message_180425.png?alt=media&#x26;token=efae72a2-6567-44a0-b70f-fd0cfbf0e84f" alt="Screenshot of the Batch message composition module, showing an example with Voucherify attributes ({{u.voucher_code}} for instance)"><figcaption></figcaption></figure>

If you are targeting a mobile application, you might also want to [add a **Mobile Landing**](https://doc.batch.com/getting-started/features/mobile-engagement-platform/push/message-edition#mobile-landing) to allow your customers to copy the voucher code to their clipboard:

<figure><img src="https://2998247023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbwlQFpRAhaFR79zae6Jf%2Fuploads%2FxabBo9grhCs35jZpur1y%2Fintegrations_voucherify_landing_180425.png?alt=media&#x26;token=26eb631c-1072-4395-898b-fec73148104c" alt="Screenshot of the Batch Mobile Landing composition module, with an example of a modal containing the Voucherify code that can be copied to the clipboard via a button in the modal"><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://doc.batch.com/integrations/marketing-platforms/how-to-connect-batch-to-voucherify.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
