Introduction
The discount module lets you manage pricing in your application. You can create discounts on orders and individual products, set up personalized offers for specific user groups, and run bonus programs.
To get started, open the "Discounts" section in the left vertical menu.
Discount types
There are three types:
Discount
A general-purpose discount that applies to an order or to individual products when the specified conditions are met. Conditions can include specific products or categories in the order, a minimum order amount, the user's LTV, and more. The discount can be a percentage, a fixed amount, or a fixed product price. You can also set up coupons and gifts.
Personal Discount
Works like Discount, but you can also restrict the discount to specific user groups. It also has one extra condition: the user has a specific attribute.
Bonus
A program that awards bonuses to users. Bonuses are awarded when certain events occur: an order status changes, a form is submitted, or a specified date arrives. Users can spend accumulated bonuses when placing an order.
How discounts are applied to orders
Discounts are applied when an order is created or pre-calculated through the API:
POST /api/content/orders-storage/marker/{marker}/orders
You can use the same endpoint to pre-calculate the result of applying discounts without creating an order.
A discount can apply:
- To a specific product: the discount information is already visible on the
/productsendpoints. - To the whole order: the discount is applied when the order is created or pre-calculated.
The discountConfig field of the response stores information about the applied discounts, coupons, and gifts, the price of each product before and after the discount, and the order total.
- If the discount has a coupon condition, it applies only when the coupon is passed in the
couponCodefield of the request. - If it has a dynamic condition, it applies only when the discount marker is passed in the
additionalDiscountsMarkersarray of the request.