The Trigger Provider service plugin provides methods for implementing your app's trigger on Wix users' sites. With the service plugin, you can let users do the following:
Learn more about implementing a service plugin with Wix.
Validate that the products listed in a trigger are still in the store.
It's important to note the following points before starting to code:
You select which service plugin methods you want to implement when you create a trigger in the app dashboard. There are 3 methods you can choose to implement:
Validate Configuration
: We recommend implementing this method, which indicates to the Wix user whether a trigger configuration is valid.Get Dynamic Schema
:
Implement this method if you want to create different options for users to configure the trigger. For example, if site visitors can submit several different forms, you can use Get Dynamic Schema
to give the site owner different options to configure each form. The method then updates the fields available to the user for configuring the trigger, depending on the form selected. You must configure an item selection filter to use this method.Refresh Payload
: Implement this method if there will be a delay between the trigger and the action, and in particular if the data may update during that time period. This allows the user to receive any updated data before the action occurs.