IncentiveAction
The action an incentive business rule performs on the order when its conditions match.
Actions are configured through the rule's params: productId, price, discount with discountType (FlatFee for an amount, Percentage for a percentage of the unit price), quantity (defaults to 1) and repeat. With repeat: Y the quantity is multiplied by the number of complete sets the order holds, so a rule that triggers at 3 qualifying pieces awards its quantity twice for 7 pieces.
Qualifying lines are the order lines matched by the rule's item conditions, or every order line when the rule has none. Bonus items are extra order lines added by an incentive; they are never evaluated by business rules themselves.
enum IncentiveAction {
ADD_PRODUCT_TO_BONUS_ITEMS
DUPLICATE_PRODUCT_IN_BONUS_ITEMS
DUPLICATE_CHEAPEST_IN_BONUS_ITEMS
ADD_CHEAPEST_TO_BONUS_ITEMS
GIVE_DISCOUNT_TO_ORDER_ITEM
GIVE_DISCOUNT_TO_ORDER_TOTAL
SET_SHIPPING_COSTS
SET_TRANSACTION_COSTS
GIVE_DISCOUNT_TO_CHEAPEST_ITEM
}
Values
IncentiveAction.ADD_PRODUCT_TO_BONUS_ITEMS
Adds the product in productId to the bonus items, quantity pieces.
Priced by price when set (0 makes it free), otherwise by discount and discountType; with neither it is charged at full price. Nothing is added when the product cannot be found.
Use it for a free gift or a discounted add-on, e.g. a free tote bag on orders over €100.
IncentiveAction.DUPLICATE_PRODUCT_IN_BONUS_ITEMS
Adds the product in productId to the bonus items, quantity pieces, free unless a discount is configured.
Priced by discount and discountType only; price is ignored. Without a discount the pieces are free.
Use it for "buy product X, get X free" on a named product.
IncentiveAction.DUPLICATE_CHEAPEST_IN_BONUS_ITEMS
Adds copies of the cheapest qualifying products to the bonus items, quantity pieces in total, free unless a discount is configured.
Pieces are taken from the cheapest qualifying line first, spilling into the next line when one runs out, with one bonus line per product. Pieces beyond what the qualifying lines hold are added to the cheapest. Lines priced at 0 never qualify. Priced by discount and discountType; without a discount the copies are free.
Use it for "buy 2, get 1 free" as an extra line: trigger at 2 qualifying pieces, quantity: 1, repeat: Y. GIVE_DISCOUNT_TO_CHEAPEST_ITEM gives the same promotion as a markdown on the existing line instead.
IncentiveAction.ADD_CHEAPEST_TO_BONUS_ITEMS
Adds the single cheapest qualifying product to the bonus items, quantity pieces.
Priced by price when set (0 makes it free), otherwise by discount and discountType; with neither it is charged at full price. Lines priced at 0 never qualify.
Unlike DUPLICATE_CHEAPEST_IN_BONUS_ITEMS it always takes one product and is not free by default.
IncentiveAction.GIVE_DISCOUNT_TO_ORDER_ITEM
Discounts every piece on every qualifying order line by discount (FlatFee per piece, or Percentage of the unit price).
Requires item conditions: a rule without them discounts nothing. quantity and repeat are ignored. An order line carries one incentive, so a second item-level rule on the same line replaces this discount rather than adding to it.
Use it for product or brand discounts, e.g. 10% off brand X, or for tiered discounts as rows of a single rule.
IncentiveAction.GIVE_DISCOUNT_TO_ORDER_TOTAL
Discounts the order total.
With Percentage, discount percent is taken off the total; quantity and repeat are ignored. With FlatFee, discount multiplied by quantity is taken off. Several matching rules with the same discountType add up; when the types are mixed only the last applied type remains.
Use it for order-wide offers, e.g. €10 off orders over €100.
IncentiveAction.SET_SHIPPING_COSTS
Sets the order's shipping costs to price, or to 0 when no price is set.
Has no effect when the shipping costs are already overruled, by the order itself or by an earlier rule. quantity and repeat are ignored.
Use it for free or reduced shipping, e.g. free shipping on orders over €50.
IncentiveAction.SET_TRANSACTION_COSTS
Sets the order's transaction (payment) costs to price, or to 0 when no price is set.
Has no effect when the transaction costs are already overruled, by the order itself or by an earlier rule. quantity and repeat are ignored.
Use it to waive or reduce payment fees, e.g. no transaction costs for business customers.
IncentiveAction.GIVE_DISCOUNT_TO_CHEAPEST_ITEM
Discounts quantity pieces of the cheapest qualifying order lines by discount (FlatFee per piece, or Percentage of the unit price); no line is added.
Pieces are taken from the cheapest qualifying line first, spilling into the next line when one runs out. The discount is capped at the unit price. Lines priced at 0 never qualify, and nothing happens when no discount is set. An order line carries one incentive, so this replaces any other item-level incentive on that line.
Use it for "buy 3, pay for 2" on the existing lines: trigger at 3 qualifying pieces, quantity: 1, discount: 100, discountType: Percentage, repeat: Y. DUPLICATE_CHEAPEST_IN_BONUS_ITEMS gives the same promotion as an extra free line instead.
Member Of
IncentiveRuleRowInput input ● IncentiveRuleSetActionInput input