evaluate-promotions
(under Dynamic Pricing Engine) API evaluates if discounts can be applied based on Price_Kind value.
targetProduct
key will define the items that will get discounts. It includes SKU, CATEGORY, ATTRIBUTE and the value should be array of itemIds, array of category Ids, and array of attribute objects respectively.type
mentioned, condition
array will define a different selection of items.discount
key defines discount details.kind
as SKU
, and value as “*
”.*
” indicates that all SKUs are selected.isExclusive
boolean indicates if a coupon could be stacked on promotions. It should always be false for Promotion. If it is false
for a coupon, then the coupon could be applied even after a promotion discount is applied on the same item.eligiblePriceList
, if no priceList ID is provided, then by default the discount will be applied to all priceLists.USER_SEGMENT
condition is included, which means promotions/coupons can be applied to a certain segment of customers. Following is an example:targetProducts
arraytype
should be PRODUCToperator:IN
indicates the target product is included for discountsoperator:NOT_IN
indicates the target product is not included for discountstype
should be CARTcondition
array for CART promotiontype
should be QUANTITYcondition
array for QUANTITY promotiontype
should be SHIPPINGdiscount.ON.kind
is set as SERVICE, discount is applied at SKU level. Discount will be applied to each unit.discount.ON.kind
is set as SERVICE_CART, discount is applied at cart level. Discount will split between items.type
should be BUYGETdiscount.ON.kind
is set as SKU, quantity should be specified in discount object to limit max quantity the discount can be applied to. Discount will be applied on each unit.discount.ON.kind
is set as CART, quantity should not be specified in discount object. Discount will split between items.buyOperator
is used to define operator between different buy conditions (values between the condition
array)autoAdd
should be set as true
and 100% off
in discounttype
should be SPEND_GET
quantity
requirement in discountpromoCodes
array in the request
promoCodes
array contains only one element or one coupon code, it indicates that the promo codes can be reused.promoCodes
array contains multiple elements or multiple coupon codes, it indicates that each promo code can be reused only once.isExclusive
as false (stackable)isExclusive
as true (non-stackable)PER_USER
, SITE_WIDE
, ORDER
PER_USER
will restrict on the number of times a user can redeem this couponSITE_WIDE
will restrict on the number of times the coupon can be redeemedORDER
is applicable to PRODUCT type and BUYGET type only