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:
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:
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 trigger 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 triggerProvider.provideHandlers()
to define the following handler functions that implement your custom business logic.
Function | Required |
---|---|
refreshPayload() | No |
getDynamicSchema() | No |
validateConfiguration() | No |
This is the basic code structure for implementing a self-hosted Trigger Provider service plugin: