Skip to content
Operator handbook
Create a Cart Discount
Commercetools
Commercetools

Create a Cart Discount

This article explains how to create Cart Discounts in CommerceTools.

Contents

Cart Discount Overview

In CommerceTools all existing Cart Discounts can be viewed in a list overview. Before creating a new Cart Discount, it may be a good idea to view similar existing Cart Discounts.

Cart Discount List

To view all existing Cart Discounts, navigate to the left menu bar to the Discounts section, and select ‘Cart discount list’.

Cart Discount List

Sort the list by selecting the column headers.

Cart Discount List

Refine the list of displayed cart discounts by either entering a search term.

Cart Discount List

Or by applying one or more filters, by clicking the ‘Filters’ button

Cart Discount List

Selecting a discount from the list will display it’s properties and specific configuration.

Cart Discount List

When creating a new discount, it is a good idea to compare it with existing discounts, especially ones it might be combined with. Keeping in mind that the Rank (sortOrder) field value determines the hierarchy and combinability of discounts.

Cart Discount List

It is furthermore a good idea to use a similar discount as an example, some specific configurations can be quite complex.

A Discount Code must be linked to a Cart Discount, and the Cart Discount must be created first. Discount codes have a separate list in the discounts tab in CommerceTools. But they are inherently linked to the associated Cart Discount. It’s important to understand this relationship. See Create a Discount Code.

Create a Cart Discount

There are two ways to create a Cart discount, via the Add Discount button on the respective list view pages.

Discount Code Link

Or via the left menu bar

Discount Code Link

Navigating via the menu bar will first open the discount type selection.

But after selecting ‘Add Cart Discount’ the same creation screen will be displayed.

Discount Code Link

Cart Discount Type

This is where you can choose between a numeric discount or a gift-line item. In this article we only discuss numeric (relative (%) or absolute) discounts.

Cart Discount Type

General Information

Name

A Cart Discount must have at least one name in on of the available languages

Name

But you may choose to fill in the names for other languages by clicking ‘show all languages’. Discount names should be descriptive and clear as it is the primary way that discounts can be searched for in CommerceTools.

Description

The description is how the discount is displayed to the customer in the shopping cart on the webshop.

Description

This is a non-mandatory field and just like the name field you may choose to fill in the names for other languages by clicking ‘show all languages’.

Key

This is unique identifier which is a way that discounts can be searched for in CommerceTools. When left empty, the key is set automatically after saving.

Key

Store

Using the store field you can specify if the cart discount will be limited to a subset of stores, as indicated, leaving this field empty will make the cart discount valid for all stores in the tenant.

Store

The stores that you have already added will be displayed and removed in the section directly under the field.

Store

Recurring Intervals

This feature is not supported - Always leave this field on the default selection Since a release of a new version of CommerceTools Merchant Center in January 2026, a selection field has been added where a Recurring interval can be selected. It should however remain on the default selection as this feature is not supported

Recurring Intervals

Rank (sort Order)

In CommerceTools, to ensure that various types of discounts function

Rank (sort Order)

correctly with each other and to determine the precedence of one discount over another, the value of the field ‘Rank (sortOrder)’ is used.

The value of this field determines the order, sorting and stacking of various discounts.

Range 1.0 - 0.900

This range is for discounts that should take precedence over all others, typically those that you do not want to stack. Therefore, make sure to check the 'do not stack' option. This ensures that the discount applied will be the only one. For instance, a code with a large relative discount will fall into this category. Additionally, tier discounts will not be applied concurrently with this discount.

Range 0.899 - 0.8

This range is reserved for tier discounts. Tier discounts need to be in a relatively high sort order because if they are placed under another discount, the relative discount will be incorrect. For example, if a 5% discount is applied first, a subsequent 10% tier discount will be calculated on the already reduced price, leading to an incorrect 10% discount on the original price.

Range 0.799 – 0.0

This range is designated for discounts that can be stacked under tier discounts. For instance, a 5% cart volume discount that is applied when the cart reaches a certain value. The rationale for placing this discount under tier discounts is to prevent it from affecting the price of the tier discounts, and to ensure that tier discounts are calculated before applying volume discounts. These discounts can be stacked regularly.

Discount rank value logic

The rank for the cart discount determines which cart discount applies to your product first if the customer's cart has multiple cart discounts applied. Discounts with a rank value closer to 1 are considered first. Rank values can only be a value between 0 > 1. For example:

  • Cart discount 1 has a Rank value: 0.07
  • Cart discount 2 has a Rank value: 0.05
  • Both cart discounts are active and apply to the same cart. Cart discount 1 will apply before Cart discount 2 is applied.

Stacking options

Currently in CommerceTools we only use one type of stacking option; Do not apply any further cart discounts after this one.

When this option is enabled all discounts with a lower rank order value will not be applied. So, for this option to work for the discount you are creating it must be the highest value of any other applicable cart discounts it will be used in combination with.

Rank (sort Order)

However, this option does not interfere with product discounts. Product

discounts and cart discounts can be executed simultaneously, but the product discount always precedes the cart discount in order.

Discount Code

Toggle whether a code is required to use the cart discount.

Discount Code

Valid Date

By specifying a date range you can limit the validity of the cart discount.

Valid Date

If left empty the discount is valid indefinitely.

Discount configuration

There are two main parts of the discount configuration: the effects and the conditions. Both parts are mandatory and must be configured before being able to save the cart discount.

Discount effects

Discount effects

There are five types of effects to choose from.

Discount effects

Discount effects

Total Price

Discount applies to the total price of the order. If taxes are included in the price and/or shipping, the discount is calculated after taxes.

Item

Discount effects

Discount effects

This discount applies to a Line Item, which represents products or services that are defined in the product catalogue. First you must determine if the discount should apply to specific items or all items.

Discount effects

When applying the discount to specific items a configuration section will appear on the screen. There are several types of rule logic that can be used to specify which items the discount will be valid for.

Discount effects

Discount effects

Then you must appoint which items will be used by the rule’s logic. CommerceTools refers to the items as ‘Predicates’. By default, you will be creating a rule based on product ID, but by clicking the blue area you can toggle which property you search and add items to the rule’s criteria.

You may search for an item/predicate or scroll down the list and select one.

Discount effects

Discount effects

With each selected item/predicate you can further determine operator logic to apply to the value entered in its respective field.

Discount effects

Operator Logic Explanation

Operator Syntax Meaning
Is == Exact value match, e.g. used for specifying a specific product.
Is not =/= Exact value exclusion, e.g. used for excluding specific products.
Is less than < Applies to values lower than what is entered. (only applies to numeric values)
Is less than or equal to =< Applies to values lower than or equal to what is entered. (only applies to numeric values)
Is greater than > The condition applies to values greater than what is entered. (only applies to numeric values)
Is greater than or equal to => Applies to values greater than or equal to what is entered. (only applies to numeric values)
Is one of =={a,b,c,...} Value matches a set, e.g. used for specifying a set of products.
Is not one of =/={a,b,c,...} Value is not part of the set, e.g. used for excluding a set of products.
Has a value =/= null The specified field has any value.
Does not have a value == null The specified field is empty.

These fields are however not searchable. You will need to collect this data beforehand or use the product list in a sperate tab/window. You can add multiple criteria, using different selection predicates and different logic operators

Discount effects

You can add any number of different criteria. It is also possible to create the eligibility criteria via syntax, by enabling the < > option in the editing options.

Please do not use this unless you are familiar with the syntax, see the CommerceTools discount documentation. This is an example of what this syntax looks like.

Discount effects

Discount effects

Discount effects

Then you must specify what type of discount should be applied

Percentage off - enter a numerical value that determines the percentage discount applied to the total cart. Amount off - enter a numerical value that determines a discount applied to the total cart. Fixed price - enter a numerical value that determines the price of the total cart.

Discount effects

Buy and Get

This discount type will be triggered by a specific number of specifiable products to trigger a configurable discount. By default, you will be creating rules based on Product ID, but by clicking the blue area you can toggle which item/predicate you are using.

Discount effects

You may search for an item/predicate or scroll down the list and select one.

Discount effects

This type of discount can be configured to a set of any number of items/products or variants, by selecting the + Line item Criteria button you can specify additional criteria which in turn can use different .

Discount effects

Discount effects

Or simply any item/product.

Discount effects

Then specify on which amount of the items/products the discount should be applied to.

Discount effects

Or simply specify which amount for all items/products.

Discount effects

Next toggle to which of the items/products the discount will be applied to.

Using the slider determine whether the discount can repeat in the cart, if active it can be specified to a set amount or unlimited.

Discount effects

Then determine the percentage, buy and get type cart discounts can only use percentage-based discount values.

Discount effects

Discount effects

Discount Bundles

This type is a simpler amount-based discount, compared to Buy and get, you cannot target which products the discount is applied on, only which products trigger it and the amount.

You can choose an amount of specific items/products

Discount effects

Discount effects

Or simply the amount of any products.

Discount effects

Next toggle to which of the items/products the discount will be applied to.

Using the slider determine whether the discount can repeat in the cart, if active it can be specified to a set amount or unlimited.

Discount effects

Then determine the type and value of the discount that will be applied.

Discount effects

Percentage off - enter a numerical value that determines the percentage discount applied to the total cart.

Amount off - enter a numerical value that determines a discount applied to the total cart. Fixed price - enter a numerical value that determines the price of the total cart.

Shipping

Discount effects

As the name suggests, this discount type is used exclusively for discounts on shipping costs.

You can determine a percentage or fixed amount

Discount effects

To make shipping free enter 100 with percentage off selected.

Cart conditions

Cart conditions

After configuring one of the available cart discount effect types, you must then determine what type of cart the discount will be applied to. You can apply the discount to a specific type of cart, which can be determined by configuring any number of criteria rules.

Using the where logic specification drop down configure the failure

Cart conditions

conditions...

Cart conditions

Cart conditions

By default, you will be creating a rule based on Cart Total, but by clicking the blue area you can toggle which property you search and add items to the rule’s criteria.

Cart conditions

You may search for an item/predicate or scroll down the list and select one.

Cart conditions

Cart conditions

You may also apply a discount to all carts.

After you have made all the desired configuration you must press the save button, from this point on the discount will be available to be selected and connected to a Discount Code.

Examples

Total Price -Threshold discount

This type of cart discount requires a minimal cart value, this can include or exclude shipping, require a code or any number of further conditions. Here is an example of such a discount, it has a minimum cart value,

including shipping costs and requires a code

https://mc.europe-west1.gcp.commercetools.com/vitaminexpress-production-01/discounts/carts/424b329b-25b0-4106-b952-1d8f5a55d693/general

Total Price -Threshold discount

Total Price -Threshold discount

Total Price -Threshold discount

Item -Product based discount

This type of cart discount requires specific products or variants to be in the cart to be valid. It is a common discount used in conjunction with promotions. Here is an example of such a discount, it is percentage based and is only valid for the specified product variant.

https://mc.europe-west1.gcp.commercetools.com/vitaminexpress-production-01/discounts/carts/13ce770d-2ee2-4ac3-a262-727f9be6848e/general

Item -Product based discount

Item - Category based discount

This type of discount is commonly used in campaigns; they target a product category. Here is an example of such a discount, it is percentage based and is only valid for products in the cart that are from the specified category, as well as having further restrictions.

https://mc.europe-west1.gcp.commercetools.com/vitaminexpress-production-01/discounts/carts/ec1bf467-6441-43b0-94a7-002583de8dc6/general

Item - Category based discount

Shipping-free shipping

These discounts are used to give customers free shipping. Typically based on cart value but can be configured in any number of ways. Here is an example of such a discount that is configured to a specific campaign.

https://mc.europe-west1.gcp.commercetools.com/baerbel-production-01/discounts/carts/dfc03155-d566-4ffb-b62e-2cfcc16d584e/general

Shipping-free shipping

Duplicating a discount

If you have a complex discount setup that you want to re-use, for instance with a slight variation, or maybe linked to a different category. You can use the duplicate button in the top-right of an existing discount page to make a copy.

After clicking on the duplicate button, you will be redirected to the discount creation screen with all the fields and values from the source discount,

Duplicating a discount

besides:

The Cart discount name, which is appended by “Copy”.

Duplicating a discount

The Rank (sortOrder), which displays the source value, but must be entered manually.

Duplicating a discount

The rest of the rules, logic and field values will be copied.