How does the integration work?
The most basic way to integrate Voucherify with Customer.io is through webhooks. Voucherify can send webhook events directly to Customer.io, which captures the data and uses it to create or update a customer profile with a custom attribute, for example, a voucher code. Once the code is stored in the customer profile, it can be inserted into messages. Using Liquid, you can add the attribute to your message content so the code is dynamically filled in at send time.Scenario ideas
You can try these scenario ideas when using Customer.io and Voucherify.Behavior-based rewards
When a customer completes their first order, renews a subscription, or abandons a cart, Customer.io can notify Voucherify to create a discount code and send it to them.
Segment-driven campaigns
Customer.io segments, such as VIP customers or inactive users, can trigger specific Voucherify rewards like loyalty coupons or referral codes.
Unique rewards in templates
Voucherify generates individual codes for each customer that Customer.io inserts into messages. This prevents code reuse and keeps campaigns secure.
Setting up the integration
This guide explains how to connect Voucherify and Customer.io. In this scenario, each time you publish a code in your Voucherify campaign, Voucherify posts a webhook to Customer.io. The webhook updates the customer’s profile in Customer.io with the code attribute. The Customer.io broadcast detects that the code exists in the customer’s profile, and sends the email – or any other type of message supported by Customer.io – containing the code to the customer. This completes the loop from publication in Voucherify to delivery in the customer’s inbox through Customer.io.Set up Customer.io and get the webhook URL
In Customer.io:
- Create a new campaign from the Campaigns tab.
- Choose a Webhook trigger.
- Copy the webhook URL that Customer.io provides.
Create the coupon campaign in Voucherify
- Create a Discount coupons campaign in Voucherify.
- Provide a name, set the time frame, and define the discount value.
- Save the campaign.
Create the distribution in Voucherify
- In the Distributions tab, create a new distribution.
- Set the trigger to Successfully published and select the coupon campaign you created.
- Select Webhook as the channel and paste the same Customer.io webhook URL.
- Save the distribution.
Send a test publication
- Publish a code from the Voucherify campaign to a test customer.
- The publish action triggers the distribution and posts a webhook to Customer.io.
- In the Customer.io campaign workflow, confirm that a sample webhook was received.
- Use the fields from this payload to update the customer profile.
Map fields in Customer.io (Create or Update Person)
- Add a Create or Update Person step after the webhook in your Customer.io workflow.
- Use the webhook payload to identify the person and store the code.
-
Set the person identifier to the email from the payload using
{{data.publication.customer.email}}. -
Save the voucher code to a profile attribute, for example,
gift_code, using{{data.publication.voucher.code}}. You can choose a different attribute name (such asvoucher_code).
Create the broadcast
- Create a broadcast in Customer.io.
-
Define a condition such as “
gift_codeexists” (or your chosen attribute name). customer-io-define-broadcast.png
- Add Email as the messaging channel in the workflow and edit the message content. Insert Liquid to display the code stored on the profile:

- Once finished editing the message, you can start the broadcast.
Launch and test
Start the Customer.io campaign and the broadcast. Publish another test code in Voucherify to the same test customer. In Customer.io, verify that the person’s profile contains the code attribute and that the broadcast sent the email with the expected value.
This completes the loop from publication in Voucherify to delivery in the customer’s inbox.

