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:
It's important to note the following points before starting to code:
Follow these steps to begin implementing your 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.
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.
Use actionProvider.provideHandlers()
to define the following handler functions that implement your custom business logic. Make sure you define all required functions.
Function | Required |
---|---|
invoke() | Yes |
getQuotaInfo() | No |
validateConfiguration() | No |
This is the basic code structure for implementing a self-hosted Action Provider service plugin: