Webhook Distributions
A webhook enables Voucherify to send real-time updates to your app or URL endpoints. The updates are triggered by some event or action by Voucherify and sent to your URL via HTTP requests.
Instead of polling data from the endpoints, you can configure webhooks to get notified about triggered events, distribution channels, loyalty programs, and referral programs.
New webhooks (v2024-01-01) have been introduced in v20231205. The payload of the v2024-01-01 webhooks is significantly different from v2018-01-01 webhooks.
The events listed in the webhook section in Project settings are described in v2024-01-01 webhook documentation, which is an in-depth article primarily for developers. The webhook documentation also describes the events used in the distribution webhooks.
Contents:
Distribution channel
Distributions send messages in response to some predefined actions (events) taken by the end-customer. A webhook can be a message channel in your distributions. As a result, when distribution conditions are met, a message is sent using the webhook.
The table below shows which distributions support webhooks.
Related Activity | Event | Notify customers about promotion | Send and publish unique codes from campaign | Send plain message to customers |
Segment | Customer entered segment | |||
Segment | Customer left segment | |||
Cart | Order update | |||
Cart | Order has been paid | |||
Cart | Order creation | |||
Cart | Order cancelled | |||
Voucher | Gift credits adjusted | |||
Voucher | Loyalty points adjusted | |||
Voucher | Loyalty points expired | |||
Voucher | Loyalty pending points adjusted | |||
Voucher | Loyalty pending points updated | |||
Voucher | Loyalty pending points activated | |||
Voucher | Loyalty pending points canceled | |||
Voucher | Voucher redeemed | |||
Voucher | Voucher redemption rolledback | |||
Customer rewards | Reward redemption | |||
Manual messages | One or bulk messages | |||
Publishing codes | Successfully published | |||
Custom events | Custom event | |||
Loyalty tier related activity | Customer entered loyalty tier structure | |||
Loyalty tier related activity | Customer left loyalty tier structure | |||
Loyalty tier related activity | Customer loyalty tier upgraded | |||
Loyalty tier related activity | Customer loyalty tier downgraded | |||
Loyalty tier related activity | Customer loyalty tier prolonged | |||
Loyalty tier related activity | Customer rewarded loyalty points | |||
Referral related activity | Customer was referred |
Configuring Webhooks in the Distribution Manager
In the Distribution Manager:
- Go to Channels choice step.
- Click Add channel and select Webhook.
- Enter the Event name.
- Enter the target URL.
Additional Headers
You can add optional additional HTTP headers when setting up a webhook distribution.
In Additional HTTP headers, you can multiple add key-value pairs for your custom headers. Each header must have a name and a value. The names must be unique.
Get Notified About Failed Sendouts
You can set up notifications to inform you via email or in the app that a webhook did not reach the destination.
Go to the Notification Center > Account Settings and scroll down to Webhook callout notifications to configure notifications.
Also, you can track webhook sendouts in the Audit log > Webhook Sendouts tab.
Loyalty programs
Webhook notifications for a loyalty campaign are configured in the Campaign Manager for a loyalty campaign. The webhook notifications are triggered by the following actions:
- Publication (assigning) a loyalty card to a customer
- New points on the loyalty card
- Reward redemption and updated points balance
Read more about configuring loyalty program notifications.
Referral programs
Webhook notifications for a referral campaign are configured in the Campaign Manager for a referral campaign. The webhook notifications are triggered by the following actions:
- When a new referral code is published to a referrer.
- When the referrer becomes eligible to receive a reward.
The configuration is described in the Getting started with referral programs guide. You can configure a webhook notification for the referrer and the referee.