The Action Provider service plugin (formerly SPI) allows you to implement an action that site contributors 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 business manager. 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 service plugin lets you do the following:
To configure your action in your app's dashboard:
Select Automations from the left menu, then select Create New > Action.
Give your action a name. This is displayed to users when they add the action in the Automations UI.
Notes:
Add a short description explaining what your action does. The description is displayed to users when they select your action. This is an optional field.
Choose whether to hide the action, so it doesn't appear as an individual action on a user site. You should do this if the action is part of a pre-installed automation.
Under Action's service plugin endpoints, enter your base provider URI and select the service plugin endpoints you intend to implement.
Configure your input schema.
Optionally, configure your action's UI.
Click Save at the top of the page in order to save your action.
Next, you need to test your action to make sure everything's working. You can install your app on a free Premium development site to test it.
Once you create the test site, return to your app's dashboard and click Test Your App > Dashboard. Select the test site you installed your app on earlier. Use this site to make sure your action is working.
When you have tested your app and are ready to publish your new action, submit your app for review. A member of our team will check the changes and approve the latest version.
Once our team has approved your app, it will be published and available for users to install on their sites. When a user installs your app, your actions become available for their automations, as shown here: