The Voucherify Developer Hub

Welcome to the Voucherify developer hub. You'll find comprehensive guides and documentation to help you start working with Voucherify as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started

Automatic delivery

How to setup an automatic coupon delivery for a dynamic customer segment

In this tutorial, you'll learn how to use Voucherify building blocks to set up an automatic coupon distribution. Imagine the following scenario – your marketing team wants to have the ability to define who, when, and by which channel, gets a specific coupon code.

Import customers

Customer entity

The first thing is to map customers from your CRM. The best way to achieve this is to use the customer object – an entity built for this very purpose.

There are three ways of adding a new customer to Voucherify:

Before you make an import, you might sit together with the marketing team to figure out which details should be kept in Voucherify. This is crucial for building customer segments later on. Voucherify already provides some standard fields like email, address, or phone number, but it also allows for storing custom fields through metadata. Check the customer object reference to learn more.


There are two types of segments – manual and automatic. Manual segments always consist of the same customers. On the other hand, the size of a dynamic segment will constantly change as users meet the existing criteria or no longer meet them. So when you update a customer all segments are automatically rebuilt.

The marketing team can create segments in the Customers view, but you can do it through API as well (see the segment object). Once the first segment is created, you can test it by modifying the field the segment is built on. Again, you can do this through the UI and through the update customer method.

You can learn how to create segments in this tutorial.


The second step is straightforward. You just have to come up with a bulk unique code campaign. Whether you do it using API or with the Dashboard, consider enabling the auto-update option. If set, the campaign will auto-generate new codes when the initial pool is already used. The auto-update option will create new coupons and add them to the campaign. Otherwise, the distribution will be stopped and you'll be informed about it via email.

Also, while creating the campaign, remember to add the following validation rule in the 4th stage: Customer segment is YOUR_SEGMENT_NAME. This is to ensure that the coupons can be redeemed only by the members of this segment.


The last step is to create a distribution. Before you open the distribution manager, run through these sections to learn what possibilities you have.

Distribution mode and audience

The very first thing is to choose if it's a one-off send out (MANUAL MESSAGE) or a trigger that sends coupons automatically (AUTO MESSAGE). Auto messages are based on events. This means that Voucherify sends a coupon from a given campaign when one of these events occur:

  • Customer joins a segment.
  • Customer left a segment.
  • Order has been created.
  • Order has been updated.
  • Order has been paid.
  • Order has been canceled


There are multiple channels available. Here are some of them:

  • SMS – You have to authorize your account in the Project Settings first.
  • Email –Mandrill, and SendGrid connections available. You can also use our internal service provider.
  • MailChimp – send coupons using merge tags. As in the case of Twilio, you have to authorize your account first.

Visual composer

The last step is to design an email/SMS message. The visual composer gives you a rich-text editor to create well-formatted messages, including:

  • Coupon/QR code tags.
  • Personalized merge tags.
  • Buttons, links & images.
  • Unsubscribe link.

Updated 5 days ago

Automatic delivery

How to setup an automatic coupon delivery for a dynamic customer segment

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.