There are two main types of discounts: percentage and nominal.
The percentage type is dynamic, which means it varies according to the price of the item. Thus, it is applied to each product separately.
The nominal type requires a more accurate calculation intelligence. There are several situations in which there is more than one product associated with the same promotion in a cart. In such cases, the promotion is applied to the total sum of the products in the cart.
For tax matters, the discount must be added to each product and, therefore, it must be divided between them. Since divisions are not always exact, there is the concept of promotion proration.
When a promotion is prorated, it is divided and allocated among items according to the percentage of each product in the cart, determined by their values. That is, the higher the product’s price, the higher the percentage of nominal discount it will receive.
Examples
Let's say a nominal discount promotion of US$ 156.00 will be applied to a cart whose total value is US$ 780.00. These are the prices of each product:
- Product A: US$ 190.00
- Product B: US$ 190.00
- Product C: US$ 250.00
- Product D: US$ 150.00
Considering the calculation logic above, the proration would be like this:

This calculation is applied to unitary products, such as a blouse or a table, but some products have a configuration called multiplier unit, such as a floor box with 2.5 m², for example.
The difference here is that, after the platform goes through the logic of defining the promotion that will be applied, the product value is multiplied by the value given in that field. The discount is then applied to this total, and the proration will be based on the division of the result by the multiplying unit.