The trigger is the event that causes an automation to run. This is typically something that a visitor does on a site (for example, purchasing a product), or something a site owner does (for example, creating an invoice).
Triggers are provided by Wix apps, including apps made by Wix as well as third-party apps. You can configure triggers to be installed with your Wix app, which site owners can use in their automations. Some apps and their triggers include:
Wix app | Available triggers |
---|---|
Invoices | Invoice overdue Invoice paid Invoice sent Recurring payment starts Recurring payment canceled |
Tasks | Task overdue |
Wix Members Area | Member approved Member logs in Visitor signs up to your site |
As an app developer, you can configure triggers to be installed with your app, which site owners can use in their automations.
The main mechanism for configuring your trigger is through a payload schema, which is a JSON schema that tells Wix what data to expect in payloads. You provide your payload schema to Wix when you configure your app's triggers in the app dashboard. Your payload schema contains a list of properties and their data types, as well as whether a field contains a Wix contact ID or a date-time of a scheduled event.
It's important to understand the difference between a trigger and an event and what all this means for your users:
For more complete definitions, see Terminology in the Wix Automations API documentation.
The distinction between triggers and events is hidden from users. From your user's perspective, they interact with triggers only, whereas events are something that you handle behind the scenes. When your app reports an event, the user's automations that use the trigger are run.
Wix Automations supports two types of events for triggers: real-time events and scheduled events. Both are described in the next sections.
Real-time events occur at the time they're reported. Some examples of real-time events are a member joining a site or an email being opened.
Requirements:
This is the default event type for all triggers.
No special configuration is needed.
Effect on your user's automations:
Users can choose to run automations at the moment they're reported
or after a set delay.
Scheduled events occur at some future time relative to the time they're reported. Some examples of scheduled event fields are an invoice due date or a session start time.
Requirements:
"string"
and the format is "date-time"
.Effect on your user's automations: Users can choose to run automations immediately when the event is reported, or at a certain amount of time before or after the reported event.
Filter fields allow users to filter their trigger results
based on conditions they select when configuring the automation.
The conditions can be as simple as a boolean selector,
which allows automations to run
based on whether a given payload boolean property is true
or false
.
Or it can be as complex as an item selector,
which allows automations to run only when specific forms are submitted.
To summarize: Without a filter field, an automation runs under all configured conditions, whereas a filter field allows users to suppress automations if the user-selected criteria aren't met.
The available filter fields are:
For more information: