Introduction to Promotions
This document explains how to create different promotions and coupons based on different conditions.
API mappings
- Promotion Create: POST /api-offers/promo/create
- Coupon Create: POST /api-offers/coupon/create
General Rules:
evaluate-promotions
(under Dynamic Pricing Engine) API evaluates if discounts can be applied based on Price_Kind value.- If Price_Kind is _not_ specified, discounts are applied on any item irrespective if the item is a sale (clearance) item or not.
- If Price_Kind is specified, the item will be checked if it is on clearance or not.
- If PRICE_KIND is _set for SALE_, then only clearance items will be considered for discount.
- If PRICE_KIND is _set for BASE_, then only non-clearance items will be considered for discount.
- If free items discount is applied (free items are provided on purchase of a particular product), Price_Kind will be ignored under targetProducts.
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.- Based on the promotion
type
mentioned,condition
array will define a different selection of items. discount
key defines discount details.- If you want to select all products, use
kind
asSKU
, 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 isfalse
for a coupon, then the coupon could be applied even after a promotion discount is applied on the same item.- For
eligiblePriceList
, if no priceList ID is provided, then by default the discount will be applied to all priceLists. - Segmentation feature applies to any kind of promotions/coupons as long as
USER_SEGMENT
condition is included, which means promotions/coupons can be applied to a certain segment of customers. Following is an example:
Different Types of Promotions
Promotion on SKU
- You can create discounts on all SKUs or on selected items based on the value you provide in
targetProducts
array type
should be PRODUCT
Note:
operator:IN
indicates the target product is included for discountsoperator:NOT_IN
indicates the target product is not included for discounts
Following is an example of a discount: Get 10% off on any item
Request Body:
Response:
Promotion on Cart Items
- Cart Promotion applies discounts when the cart value reaches the set order value
- Cart Promotion supports tier structure
type
should be CART- Specify ORDER_VALUE in the
condition
array for CART promotion
Following is an example of a discount:
- Spend over 10 off
- Spend over 30 off
Request Example:
Response Example:
Promotion on Defined Quantity
You can create Quantity based promotion on the rule you have set while creating a promotion.
- Quantity promotion supports tier structure
type
should be QUANTITY- Specify QUANTITY in the
condition
array for QUANTITY promotion
Following is an example of discount:
- Buy item with quantity more than 5 units but less than 10 units from all other categories except from kitchen category, and get 10% off
- Buy item with quantity over 10 units from all other categories except from kitchen category, and get 15% off
Request Example:
Response Example:
Promotion on Shipping Cost
- Promotions can also be applied on shipping costs. You should specify shipmentMethodIds while creating promotions on shipping cost.
type
should be SHIPPING- If
discount.ON.kind
is set as SERVICE, discount is applied at SKU level. Discount will be applied to each unit. - If
discount.ON.kind
is set as SERVICE_CART, discount is applied at cart level. Discount will split between items.
Following is an example of discount: Get $10 shipping off on selected SKUs
Request Example:
Response Example:
BuyGet Promotion
- BuyGet promotion specifies Buy based on conditions and Get discounts
type
should be BUYGET- You should specify discountId in discount objects and targetProducts to link the discount to selected products
- If
discount.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. - If
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 thecondition
array)- BuyGet should not have duplicated items between different buy condition sets
- BuyGet should not have duplicated items between different get discount sets
- BuyGet will only support included SKU and Category selection
- For a free item to be considered in suggestion,
autoAdd
should be set astrue
and100% off
in discount
Following is an example of discount: Buy 5 units from (itemA, itemB, itemC) AND Buy 2 units from (itemD, itemE) , get max 2 units 10% off from (itemF, itemG) AND get max 1 units from (itemA, itemB, itemC) for free
Request Example:
Response Example:
SPEND_GET Promotion
- SpendGet promotion specifies the requirement of cart order value and the corresponding Get discounts
type
should beSPEND_GET
- You should specify ORDER_VALUE in condition
- You should specify discountId (for discount objects) and targetProducts to link the discount to selected products
- SPEND_GET should not have duplicated items between different discounts
- You should specify the max
quantity
requirement in discount
Following is an example of discount: Buy order value more than $100, get 3 units of (itemA, itemB) 10% off
Request Example:
Response Example:
Coupon Examples
Coupons have the same structure as promotion with certain differences as follows:
- Coupons should include
promoCodes
array in the request- If
promoCodes
array contains only one element or one coupon code, it indicates that the promo codes can be reused. - If
promoCodes
array contains multiple elements or multiple coupon codes, it indicates that each promo code can be reused only once.
- If
- If you want coupons to be stacked on promotions, set
isExclusive
as false (stackable) - If you do not want coupons to be stacked on promotions, set
isExclusive
as true (non-stackable) - coupons can have limit options:
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
Following is an example of discount: 10% off on Kitchen category that is limited for 2 times per user and total 100 times site wide.
Request Example:
Response Example:
Was this page helpful?