Extension Config

To configure and customize your service plugin, you need to provide important details in the plugin.json configuration file.

Note

If you created your service plugin extension with the CLI, required fields are automatically populated for you.

Configuration Params
deploymentUristring

Required. Base URI where the endpoints are called. Wix appends the endpoint path to the base URI. For example, to call the Get Eligible Triggers endpoint at https://my-discount-app.com/v1/getEligibleTriggers, the base URI you provide here is https://my-discount-app.com/.


Was this helpful?
Yes
No

getEligibleTriggers( )

Important: This is a handler function. Implement it only as part of the service plugin.


Retrieves eligible custom discount triggers based on the provided items.

This method is automatically called by Wix eCommerce to retrieve the custom discount triggers provided by your extension. This happens when actions are performed on the cart and checkout entities/pages. For example, when an item is added to the cart.

Method Declaration
Copy
Method Parameters
payloadGetEligibleTriggersEnvelope
Returns
Return Type:GetEligibleTriggersResponse | Promise<GetEligibleTriggersResponse>
Was this helpful?
Yes
No