Note: This service plugin is currently in beta and is subject to change.
The eCommerce Custom Discount Triggers service plugin (formerly SPI) allows you to provide custom triggers that specify when an item can be discounted.
Custom triggers play a part in the definition of discount rules - sets of triggers and scopes that together define the necessary conditions for a discount to apply to items in the cart/checkout.
To use a custom trigger:
listTriggers()
function.getEligibleTriggers()
and provide the logic needed for applying the relevant custom triggers.Learn more:
getConfig()
function in the -config.js file that is added to your site during step 1.listTriggers()
and getEligibleTriggers()
functions in the .js file that is added to your site during step 1.