Manage Cart Discounts Part 1

Learn how to set up gift, item, and total price Cart Discounts in the Merchant Center.

Ask about this Page
Copy for LLM
View as Markdown

After completing this page, you should be able to:

  • Use Cart Discount predicates and conditions correctly in common discount or promotion use cases.

This page explores common use cases for Cart Discounts. The use cases reference an imaginary holding company, Stride Synergy, similar to the Product Discount module. Stride Synergy owns multiple brands, each with its own website and retail store, both specializing in footwear.
The remainder of this learning module walks you through common Cart Discount scenarios, explaining when and why to use each approach. For the step-by-step procedure to create Cart Discounts in the Merchant Center, see Cart Discounts.

Use case 1: Buy x get 1 free

Shoes for Feet wants to create a Cart Discount that applies to shoes from their brand AirWave. The Cart Discount needs to meet the following conditions:
  • Cart Discount applies when the Cart total is US$200 and above.
  • The customer is buying AirWave shoes.

When both of these conditions are met, the customer receives a free Shoe Cleaner set worth US$25. Because this is a "buy x get 1 free" discount, the Cart Discount type is Gift line item — effectively giving the customer a free gift.

To follow this use case, you need a Project setup with the following:

  • A Product Type named Shoe accessories and a Product Variant named Shoe cleaner set
  • A Category named Running (which is a child category of AirWave)
  • A Product and Product Variant named AirWave Snap that has been added to the Running Category.
To learn how to configure Product Types and Attributes, see Product Types and Attributes.
To create this Cart Discount, use the following configuration:
FieldValue
Cart discount typeGift line item
Cart discount nameAirWave Shoe Cleaner above US$200
Rank (sortOrder)0.5001
StackingDo not apply any further cart discounts after this one
To select a rank value, see best practices.

Cart Discount conditions

For the cart conditions, apply the discount to specific carts where all conditions are true:
  • At least one existing line item satisfies all of the following:
    • Categories includes AirWave > Running
  • AND Cart Total is equal to or greater than 200.00 USD
Use Category in combination with Cart Total to apply discount.

Cart Discount effects

For the discount effect, specify the Product Variant to add as a gift:

  • Product ID: the ID of the Shoe cleaner set Product (found in the Product URL in the Merchant Center)
  • Variant ID: the ID of the Shoe cleaner set Product Variant (found in the Variants tab)
After saving, activate the Cart Discount using the Status toggle.

When using the Gift line item discount, you can only offer one item as a gift line item, not multiple items. In the example above, only one Shoe Cleaner set is offered, not two.

To offer multiple items for free, see Use case 5.
With this setup, Shoes for Feet offers their customers a Shoe Cleaner Set with every purchase of AirWave runners over US$200. On a test order for the AirWave Snap shoe, the Cart Discount was applied.
Cart Discount applied to Order.

Use case 2: Create an absolute discount across multiple brands

Both Stride Synergy footwear companies (Shoes for Feet and Tread Trends) want to run the same promotion across both brands. They want to offer a $25 discount on their new season items when customers spend over US$300 in the Cart. Because both companies exist in the same Composable Commerce Project, a single discount achieves this without scoping to Stores.

To follow this use case, you need a Project setup with the following:

  • A Product Type named Shoe with attributes Brand and Season.
  • A Product Variant with a Season Attribute with the value new range.
To learn how to configure Product Types and Attributes, see Product Types and Attributes.
To create this Cart Discount, use the following configuration:
FieldValue
Cart discount name$25 off all Carts over US$300
Discount valueAbsolute: 25
Rank (sortOrder)0.5003
Rank 0.5003 is higher than the gift line item discount in Use Case 1 (0.5001), so this discount takes priority. If you want it to be added after the previous promotion, choose a lower rank value. If you do not want it to apply at all after the previous discount is applied, make sure the previous discount has the Do not apply any further cart discounts after this one option selected.

Cart Discount conditions

For the cart conditions, apply the discount to specific carts where all conditions are true:
  • Cart Total is equal to or greater than 300.00 USD
  • AND at least one existing line item satisfies all of the following:
    • Attribute (Season) is one of new range
The Season Attribute needs to be created beforehand.
Use season attribute in combination with Cart Total to apply discount.

Cart Discount effects

For the discount effect, target Item and apply to specific items where all conditions are true:
  • Attribute (Season) is one of new range
Set Cart discount effect to line item and add Season attribute to target predicate.

Some things to note:

  • You could also approach this discount by creating a Category for the new season and selecting a Category in the target predicate instead of an Attribute. Both options are valid approaches for creating this type of discount.
  • The is one of operator is used instead of is because is means "is only". If an item has the new range attribute but also another attribute, the discount would not apply to that item with is.

The following image shows the discount being applied to the Cart.

Cart Discount applied to Order.

Use case 3: Create an account discount

Tread Trends wants to encourage more of their customers to sign up to their website and create an account. They are offering a 5% discount on non-sale items to motivate their customers to do so.

To follow this use case, you need to add the following to your Project setup:

  • A Category named Sale.
  • Two Channels named Shoes for Feet and Tread Trends with their Channel roles as Product Distribution.
  • Two Stores named Shoes for Feet and Tread Trends assigned to the Product Distribution Channels created in the previous step.
  • A Customer with a CustomerID and restricted to the Tread Trends Store (this is optional, but required if you want to test out in an order whether you were successful in setting up the discount).
Channels connected to Stores.
Check out Channels and Stores in the docs for information on how to set these up.
To create this Cart Discount, use the following configuration:
FieldValue
Cart discount nameTread Trends 5 percent for new accounts
StoreTread Trends
Discount valueRelative: 5%
Rank (sortOrder)0.4999
Rank 0.4999 is lower than the previous discounts, making this a lower priority. You may want to consider adding a Discount Code for this kind of discount, as it suits the use case.

Cart Discount conditions

For the cart conditions, apply the discount to specific carts where all conditions are true:
  • At least one existing line item satisfies all of the following:
    • Categories is not Sale
  • AND Customer ID has a value
The Customer ID condition with "has a value" evaluates whether the customer has created an account.
Use categories and customerId in the discount condition.

Cart Discount effects

For the discount effect, target Item and apply to specific items where all conditions are true:
  • Categories is not Sale
Create a percentage off discount setting 'Categories is not sale' as the condition.

After saving and activating the discount, check an order to verify the discount was applied correctly.

Cart Discount applied to Order.

Use case 4: Fixed amount off based on total spend

Tread Trends wants to run a straightforward holiday promotion: $10 off any cart totaling $100 or more. They also want to make sure that no other Cart Discounts are applied after this one, to keep the promotion simple and predictable.
To create this Cart Discount, use the following configuration:
FieldValue
Cart discount nameTread Trends $10 off when you spend $100
Cart discount description$10 off when you spend $100
Cart discount keytread-trends-USD10off100Cart
Discount valueAbsolute: 10
Rank (sortOrder)0.5
StackingDo not apply any further cart discounts after this one

Cart Discount conditions

For the cart conditions, apply the discount to specific carts where all conditions are true:
  • Cart Total is equal to or greater than 100.00 USD

Cart Discount effects

For the discount effect, target Total Price:
  • Apply to all line items without restriction.
When a cart value reaches $100 or more, Tread Trends customers receive $10 off.

The remaining use cases on the next page explore more advanced Cart Discount types, including Buy and Get, Multibuy, and Shipping discounts.

Test your knowledge

Imagine you work for TechGear, an electronics brand. Their most popular product is called TechPods, a wireless earbuds product. Your marketing team has decided to run a special promotion for TechPods. Customers who purchase TechPods and meet certain conditions will receive a free power bank worth $49.