Custom events are actions taken by your customers. You can use them to track clients' behavior and then build highly personalized campaigns, for example, send customers a 5% off coupon if they've abandoned the cart.
Before you start
Go here to learn more about Custom Events and how you can pass them using Voucherify API.
- How does it work?
- Enable event tracking
- Define new custom event
- Customer segments with custom events
- Distributions with custom events
- Redemption limits with custom events
- Earning rules with custom events
How does it work?
The workflow consists of four major steps:
- Enable tracking of a particular event on your website or application (this step needs to be managed by your developers).
- Add event to Voucherify Event Schema and define its attributes (optional metadata).
- Pass the event using our API.
- Use the event to segment customers, create rules, and trigger distribution.
Read on to learn more about each step.
Enable event tracking
Define new custom event
Events you want to send to Voucherify API need to be defined in the Event Schema in the dashboard. Go to the Project Settings > Event Schema, and click Add event definition.
When adding an event, you can define additional attributes that will be stored as event metadata. Metadata enables you to extend the default event structure with custom attributes. Each metadata property sent with the event is a key/value pair of a chosen data type (text, number, boolean, and many more).
You can read more about metadata in this guide.
For each property added as metadata, you can also define if it's optional or mandatory when passing the event. When the Optional box is empty (default), the attribute is mandatory.
When the event is added to the Event Schema, you can pass it using this API endpoint.
Logged events can be used to segment your audience and trigger distribution. Custom events are directly linked to the customers' resources from Voucherify. It means that each event gets a connection to a customer.
Customer segments with custom events
In the Customers section, you can group customers around the recency and frequency of a particular event. Then, click Find and apply filtering to set event-related filters.
Go to Events to see a list of all custom events already added to the Event Schema.
Choose an event you'd like to use and build filtering criteria.
Add a filter with the plus and confirm with Apply. Note that you can use many filters in a single query. When all is ready, click Apply to see the filtering results.
You can group customers that match the filters in the auto-update segment. As a result, each customer who performed the event in the required timeframe or number will enter the segment automatically.
What customer filters with events are available?
|Conditions||more than/exactly/less than.|
|Value||a number of occurrences or number of days (depending on the metric).|
Distribution with custom events
Before you start creating distribution, visit our Getting Started guide.
There are three types of event-related distributions that you can run in the Voucherify dashboard. Each of these distributions sends messages automatically in response to one of the following actions:
Customer triggered a particular custom event
This distribution sends messages in response to a logged event. When Voucherify logs an event, a message is sent to a related customer. In this distribution, you can also build customer and event-related validation rules that create additional criteria for sending a message. Distribution conditions specify the custom event that triggers a message (1) and model optional validation rules (2).
Here are the limits you can create for your distributions:
| Available in the basic and advanced Rules Builder.
Customer Activity > Customer segment – send a message only if the customer that triggered a custom event is/is not in a particular customer segment.
| Available only in the advanced Rules Builder.
Audience > Customer metadata satisfy – create rules based on metadata properties assigned to the customer that triggered the event.
For example, you can send a message only if the customer that triggered a custom event has a particular metadata property assigned.
| Available only in the advanced Rules Builder.
Advanced > Custom event metadata satisfy – create rules based on metadata properties assigned to the triggered event.
For example, you can send a message only if the triggered event has a particular metadata property assigned.
Customer entered a particular event-related segment
This distribution sends a message to a customer once he/she enters a segment defined in the distribution conditions. It means that when a customer meets segment criteria built around the custom event, he/she will receive a message. For example, customers who left at least two reviews get an email with a unique promo code.
Customer left a particular event-related segment
This distribution sends a message to a customer once he/she leaves a segment defined in the distribution conditions. It means that when a customer doesn't meet segment criteria anymore, he/she will receive a message.
Redemption limits with custom events
If you create an event-related segment, you can use it when building redemption limits. It comes down to the following steps:
- Create an auto-update customer segment that gathers customers who performed a chosen custom event. For example, on the screenshot, you can see the 'Reviewers' segment that gathers customers who performed the custom event 'new_review' at least two times.
- When creating a campaign, add a validation rule that limits redemptions to a particular segment or excludes some segments from redeeming your incentives. For example, on the screenshot, you can see validation rules saying the code can be redeemed only if a customer is in the segment 'Reviewers' (customer left at least two reviews).
Internal events reference
Besides custom events, Voucherify offers over 50 internal events that are tracked out of the box. You can use them to automate your strategy even more. Go here to see the list.
Earning rules with custom events
You can use custom events to trigger earning rules on loyalty cards. If you create a loyalty points earning rule triggered by a custom event, a customer will get points whenever this custom event occurs. You can do this by creating a loyalty campaign with an earning rule that is triggered by a custom event. Read more in this guide.
To further narrow down the criteria for the earning rule, you can add a validation rule that is based on the custom event metadata. How can you do this? You can define the specific attribute values that the custom event needs to have in order to qualify the earning rule. It comes does the following steps:
- Create a loyalty campaign with an earning rule based on a custom event. Read more.
Add a validation rule to the earning rule using the advanced rule builder.
Using the Advanced Rules, choose Custom event metadata satisfy and set the event criteria.
- First find the event using the magnifying glass , or create a new event using the plus
- Select the custom event metadata property.
- Choose a condition.
- Assign a value that the property should be equal to.
- Click Add.
After saving the campaign, this custom event will trigger the earning rule only if the specific metadata of the custom event match the values defined in the validation rule.