- 4 Minutes to read
Triggers
- 4 Minutes to read
A trigger is the basic condition for the workflow to begin. Each workflow can have only one trigger.
Please note that some triggers and their configuration options become available after the necessary module is turned on in your loyalty program. If a node is not available for you, contact the Antavo Service Desk.
Module dependencies of triggers
Trigger node | Module required |
---|---|
Event | - |
On a date | - |
Challenge progress change | |
Historical events | - |
Trigger outputs
Each trigger listed below, except for the Event node, has only one output (ON).
The ON is the output where all the filters, actions, and modifiers should be connected. |
Trigger types
On a date
Date-triggered workflows are executed by a service automation. If the service is not configured properly, you may encounter a The cron job is missing error message even after activating the workflow. In such cases, please reach out to our Service Desk for assistance.
The On a date trigger allows you to schedule your workflow to a specific date based on the UTC timezone. There are two options to define the date:
One-time: The workflow will run on a specific date and time, or immediately after activation. This option is useful for tasks like rewarding all customers or specific customer segments at predefined times. Please note that the One-time trigger option is not available for general workflows, as they are designed for long-term operation.
Repeat: The workflow will run periodically (once a day/week/month/year) at a specific time within a given timeframe. This option is suitable for tasks like rewarding customers on their birthdays.
On a date node’s configuration interface of campaign workflows
On a date node’s configuration interface of general workflows
Pre-filter date-triggered workflows
Since On a date workflows execute for every customer in the loyalty program, this process can be time-consuming. To improve performance, we’ve introduced the pre-filtering option to exclude certain customers from the workflow execution, reducing the number of times the workflow needs to run.
For example, let’s consider rewarding a group of customers with a campaign bonus when they have 1000 points. With pre-filtering, the workflow is only applied to this relatively small group of customers.
Note that pre-filtering does not support Segments.
Customer attributes that cannot be used for pre-filtering:
name
spendable
purchase_frequency
referral_hash
nickname
purchase_avg_items
purchase_avg_total
birthday
(use birth date instead)age
extensions
relations
last_earn_date
last_spend_date
To optimize pre-filters for better performance, please consider SQL querying best practices, like the order of criteria, quality of criteria, and quality of operators. E.g.:
Use
boolean
criteriaPrioritize the most selective criteria (those that drastically reduce the number of records)
Favor positive operators over negative ones (use
equals
instead ofnot equals
)Minimize the use of
contains
anddoes not contain
operators whenever possible
Event
An Event trigger initiates the workflow execution immediately upon the registration of a customer event within the loyalty program context (e.g., Checkout, Optin, Tier up, etc.) with a few exceptions listed below. The Event trigger configuration includes a single field where you can specify the customer event(s) that will activate the workflow. If multiple events are selected, the workflow is triggered whenever any selected events are registered. For example, you might want to send email notifications to customers when they win contests.
As explained earlier, the Event trigger has 2 outputs: modifiers and actions
|
Challenge progress change
You can use the Challenge process change trigger to initiate actions when customers advance in a challenge configured under the Challenges module. Consequently, this trigger is accessible if the Challenge module is enabled in your loyalty program.
This trigger features a single configuration field: a dropdown field to select the challenge the workflow should monitor. The workflow will be triggered each time a customer makes an action specified as a criterion within the selected challenge.
Historical events
A Historical event trigger executes workflows based on events previously registered in the database. These events encompass various actions occurring within the loyalty program context (e.g., Checkout, Optin, Tier up, etc.).
There are two settings for a Historical event trigger:
Event: Define a customer event that must have been completed in the past for the workflow to begin (e.g., you want to give an instant coupon reward to customers who made a purchase previously).
Start and end dates: Filter the workflow execution to events registered within a given timeframe in the past in the UTC timezone. The workflow will only begin if the event is made within a given timeframe (e.g. you want to give an instant reward to customers who upgraded to a higher level last year).
Both settings can be applied to campaign workflows and general workflows as well.
After configuring the entire workflow, you"‘ll need to its execution. Save the workflow, then click Schedule in the upper right corner, and confirm your choice in the dialog that appears. The status of the workflow is automatically updated to scheduled and then to completed when the workflow has run. Check the logs to see the results of the workflow execution.
Please note that one workflow can only be scheduled once. If you’d like to schedule a workflow with the same logic again, we suggest creating a clone of the workflow.