About the Wix Automations Action Provider Service Plugin

The Action Provider service plugin allows you to implement an action that Wix users can add to automations on their sites. This means you can take actions in your service in response to events that happen on Wix sites or in the site dashboard. For example, in response to a trigger, your service can send an email, generate an invoice, or update another Wix service using its APIs.

The Action Provider service plugin lets you do the following:

  • Invoke your action.
  • Validate the input values to the action and return an error to the Wix user if they're invalid.
  • Display the limits you enforce on the number of actions a Wix user can perform.

Before you begin

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

  • Once you publish an app with a custom action, there are limitations to the changes you can make to the input schema you define when configuring your action. Learn more about editing a published input schema.
  • Wix does not validate breaking changes to an input schema that uses composition. To ensure the user doesn't make errors when configuring an action that uses composition in its schema, we recommend performing the validation on your end.

Action timeouts

Some actions take time to complete, such as getting a site visitor's input or retrieving large amounts of information from a remote database. In these cases, you might want Wix to pause the automation until your action completes.

When Wix calls Invoke to run your action, your response can specify a timeout period during which Wix waits. When your action completes, successfully or not, call Report Action Invocation Completed with the action's status and any output data to let Wix know it can continue. If you don't call this method in the timeout period, Wix marks the action as failed and continues to the next step in the automation.

Use cases

Terminology

  • Input schema: A JSON Schema object that defines the fields that Wix needs to pass to your service plugin methods. Learn more about the input schema.
  • UI schema: The JSON schema that defines the UI for your action configuration in the user's site dashboard.

See also

Did this help?