About the 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:

  • Keep in mind that 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 does not make errors when configuring an action that uses composition in its schema, we recommend performing the validation on your end.

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 Wix user's site dashboard.

Get started

Follow these steps to begin implementing your service plugin:

Step 1 | Learn how to implement a self-hosted service plugin

This service plugin can only be implemented with the self-hosted framework. Learn how to implement a self-hosted service plugin with the SDK.

Step 2 | Configure your action and select your service plugin methods

When you configure your action in the app dashboard, select the service plugin methods you intend to implement under Service plugin endpoints. You also need to provide a base URI so that Wix knows where to call each method.

Step 3 | Define handler functions

Use actionProvider.provideHandlers() to define the following handler functions that implement your custom business logic. Make sure you define all required functions.

FunctionRequired
invoke()Yes
getQuotaInfo()No
validateConfiguration()No

Code examples

This is the basic code structure for implementing a self-hosted Action Provider service plugin:

Copy

See also

Did this help?