Skip to main content

Introduction

The discount module provides a flexible tool for managing pricing in your application. With it, you can create discounts on orders and individual products, set up personalized offers for specific user groups, and launch bonus programs.

To get started, open the "Discounts" section in the left vertical menu.

Types of Discounts

There are three types available in the system:

Discount

A universal discount that applies to an order or individual products when certain conditions are met. Conditions may include the presence of specific products or categories in the order, a minimum order amount, user LTV, and more. The discount can be a percentage, a fixed amount, or a fixed price for a product. Additionally, coupons and gifts can be configured.

Personal Discount

Works similarly to the Discount but with the added ability to restrict the application of the discount to specific user groups. An additional condition is also available — the presence of a specific attribute for the user.

Bonus

A program for awarding bonuses to users. Bonuses are awarded when certain events occur — such as a change in order status or the submission of a form. Accumulated bonuses can be used by the user when placing an order.

How Discounts Are Applied to Orders

Discounts are applied at the moment of creating or pre-calculating an order through the API:

POST /api/content/orders-storage/marker/{marker}/orders

You can also pre-calculate the result of applying discounts (without creating an order) through the same endpoint.

A discount can be applied:

  • To a specific product — in this case, the discount information is visible on the /products endpoints.
  • To the entire order — the discount is applied when creating or pre-calculating the order.

Information about applied discounts, coupons, gifts, the cost of each product before and after the discount, as well as the total order amount, is stored in the discountConfig field of the response.

Dynamic Conditions and Coupons
  • If a coupon condition is specified in the discount, the discount is applied only when the coupon is provided in the couponCode field of the request.
  • If a dynamic condition is specified, the discount is applied only when the discount marker is provided in the additionalDiscountsMarkers array of the request.