Skip to main content

Creating a pro rata discount

Pro-rata discounts are applied evenly among all eligible items in the cart.

This can be useful for managing returns. For example, if a customer returns one of the products they purchased, only the proportional part of the discount corresponding to that product will be rolled back. In other cases, accounting regulations and laws may require discounts to be applied pro rata.

Let's imagine that our business is a clothing store and we want to create a campaign that gives a total discount of 20 euros on all pairs of shoes in the cart. The discount is applied pro rata, in proportion to the price of each pair of shoes. For example, if a customer purchases 2 pairs of the same shoes, they receive a 10 euro discount on each pair.

To do this, let's use cart item filters and enable cart item flattening for the campaign. Without flattening cart items, all identical cart items are viewed as a single one with their total quantity.

Let's create:

  1. A cart item filter to filter items by category (in our example, shoes).
  2. A promotion rule to issue a pro rata discount on all pairs of shoes in the cart.

Filtering the cart items by item category

Let's filter the cart by product category to find all the shoes in it. This will allow us to create rules on those items.

Filter items by condition:

  • Attribute is Item category (Item).
  • Is equal to shoes.
  • Save as shoesfilter.

To the right of the filter name, you can see the kind of value assigned to our filter. In this case, it is list of cart items. This means that this filter will be available wherever other lists, such as the list of cart items, are available.

Issuing a pro rata discount on the selected items

Let's create a rule to issue a 20 euro discount on all pairs of shoes in the cart. The discount will be applied to each pair in direct proportion to its price.

Important

Before you start, let's ensure we have enabled cart item flattening.

Let's name the rule 20 euro pro rata on shoes. It has 1 condition and 1 effect.

Condition

Always Trigger Effects.

Effect

Discount individual items pro rata:

  • List of items is shoesfilter.
  • Discount name is 20 pro rata.
  • Discount value is 20.
  • Allow lower discount value if budget is insufficient is Application Default Settings.