About the Triggered Events API

The Triggered Events API allows you to turn events in your service into triggers. Using this API, your app can report events to Wix. A reported event becomes a trigger that site owners can use when they create their site automations.

With the Triggered Events API, you can:

  • Report events to trigger site automations.
  • Bulk report multiple events simultaneously to activate corresponding automations.
  • Cancel and bulk cancel events to stop any remaining actions associated with a trigger and external entities.

Before you begin

It's important to note the following points before starting to code:

  • You must add a trigger to your app and define its payload schema in the app dashboard before you report an event.
  • Only the app that the trigger belongs to can report the event.
  • Make sure you know your trigger key. You can find this by selecting your trigger in the app dashboard.

Use cases

  • Report an invoice overdue event, then cancel it when the customer pays the invoice.
  • If a customer has booked multiple sessions then canceled all of them, you can use Bulk Cancel to cancel all reminders for those sessions.

Terminology

  • Trigger Key: A unique string that identifies the trigger.
  • External Entity ID: A GUID that identifies the related resource for an event, such as a contact or session ID. This allows you to identify the specific case for which the event was reported. See Reporting and Canceling Events for more information.
  • Idempotency: A mechanism to ensure that multiple identical requests don't cause unnecessary automation activation. You pass in a unique idempotency key for the event when you report it. If an event with the same idempotency key is reported multiple times, Wix ignores it for the duration of time that you define.
Did this help?