This is the early access documentation preview for Custom Views. This documentation might not be in sync with our official documentation.
Manage Cart Discounts Part 1
Learn how to set up Cart Discounts in the Merchant Center.
After completing this page, you should be able to:
- Use Cart Discount predicates and conditions correctly in common discount or promotion use cases.
On this page, we will explore some common use cases for Cart Discounts. To explore the below use cases, we'll use an imaginary holding company, Stride Synergy, similar to what we had used in our Product Discount module earlier. Remember that Stride Synergy owns multiple brands, each with its own website, retail store, and both specializing in footwear.
In our Product Discounts module we showed you step by step how to set up Product Discounts. Setting up Cart Discounts is very much the same process so we will not focus as much on the steps needed to accomplish the process. If you are still learning how to correctly set up the discounts, our Merchant Center Cart Discounts documentation will be a great help to you, as will this tutorial. In the remaining use cases, we will explain the main principles you should consider and only show UI step procedures if we have introduced something new.
Use case 1: Buy x get 1 free
For our classic 'Buy x get 1 free' discount, let's look at Shoes for Feet. They wish to create a Cart Discount which applies to shoes from their brand AirWave. The Cart Discount needs to meet the following conditions:
- Cart Discount should apply when the Cart total is US$200 and above
- The customer is buying AirWave shoes. When both of these conditions are met, they will receive a free Shoe Cleaner set worth US$25.
To follow this use case, you'll need a Project setup with the following aspects before continuing:
- A Product Type named
Shoe accessories
and a Product Variant namedShoe cleaner set
- A Category named
Running
(which is a child category ofAirWave
) - A Product and Product Variant named
AirWave Snap
that has been added to theRunning
Category.
To learn how to configure Product Types and Attributes, see Product Types and Attributes.
Now let's look at how to set this up in the Merchant Center. We'll use one of our Discount Templates for this use case so that you can see how to use these:
- Select Add discount from the Discounts menu in the left-hand side navigation.
- Select Gift with purchase from the Discount templates drop-down box. (If you cannot see it, follow the instructions here to find the option.)
- Select Select template.
General Information
Please note: if we do not mention a field below, you can leave that field empty.
- You can see that a Gift line item discount is selected as Cart discount type. (As we are creating a ‘Buy x get 1 free’ discount, we are effectively giving the Customer a free gift).
- Enter a clear Cart discount name, for example
AirWave Shoe Cleaner above US$200
- Enter a Rank (sortOrder) value of 0.5001. (See our section on Ranking in Product Discount’s Best Practices)
- Select the Do not apply any further cart discounts after this one button, so that this will be the last discount that can be applied to the Cart.
Cart Discount conditions
In the Under these cart conditions section:
- Select Apply to specific carts
- Select all of these are true:
- Select At least one line item exists under Functions in the side panel. (If it’s not available, click View all predicates to reveal it).
- Select all of these are true:
- Select Categories, then includes and then AirWave > Running.
- Select is and then select True.
- Click AND condition.
- Select Cart Total then is equal to or greater than and enter
200.00 USD
.
Cart Discount effects
- As we selected Gift line item earlier as the Cart discount type, in our Apply these discount effects section we now have to add a specific Product Variant that we will offer as a gift. Go to the Product page of the Shoe cleaner set Product you created in Merchant Center and copy the Product ID from the URL (copy all values after the final forward slash).
- We are adding a Product Variant as the Gift line item here, so we need to enter the correct Variant ID. To find this, click Variants and then select the ID from the correct Product Variant.
- From here select Save and don't forget to activate the Cart Discount otherwise it will not be applied.
Please note that when using the Gift line item discount, you are only able to offer 1 item as a gift line item, and not multiple items. In our example above, it is possible to only offer 1 Shoe Cleaner set, and not 2 Shoe cleaner sets.
To offer multiple items for free, you would need to look at Use Case 4 below.
And that’s it. With this setup, Shoes for Feet will be offering their Customers a Shoe Cleaner Set with every purchase of AirWave runners over US$200. On a test order we completed on our AirWave Snap shoe, you can see below that the Cart Discount was applied.
Use case 2: Create an absolute discount across multiple brands
In our next scenario, both of the Stride Synergy footwear companies that we have looked at so far (Shoes for Feet and Tread Trends) wish to run the exact same promotion across both brands. They want to offer a $25 discount on their new season items when they spend over US$300 in the Cart. As both companies exist in the same Composable Commerce Project, this is easy for us to achieve with the one discount; there is no need for us to scope this to Stores in Composable Commerce. Let’s have a look at how we might achieve this promotion.
To follow this use case, you'll need a Project setup with the following aspects before continuing:
- A Product Type named
Shoe
with attributesBrand
andSeason
. - A Product Variant with a
Season
Attribute with the valuenew range
.
To learn how to configure Product Types and Attributes, see Product Types and Attributes.
Let's use one of our Discount Templates again for this use case:
- Select Add discount from the Discounts menu in the left-hand side navigation.
- Select Amount off item(s) in cart from the Discount templates drop-down box. (If you cannot see it, follow the instructions here to find the option.)
- Select Select template.
General Information
- Enter your Cart discount name:
$25 off all Carts over US$300
. - Enter a Rank (sortOrder) value: 0.5003. (If this promotion is to exist at the same time as the promotion Shoes for Feet is running in Use Case 1 above, and you want it to be added first, then you would need to make sure that this discount has a higher Rank (sortOrder) value than the previous one. If you want it to be added last, then you would need to choose a lower value. If you don’t want it to be applied at all after the previous discount is applied, then you would need to make sure you have checked the Do not apply any further cart discounts after this one on the previous discount.)
Cart Discount conditions
- For your Under these cart conditions section, you can set it up as in the screenshot below. You can see here that there are two parts ANDed together: the
Cart Total
is equal to or greater thanUS$300
and that there is aSeason
Attribute with the valuenew range
. (TheSeason
Attribute needs to be created beforehand.)
Here are the steps to follow in the Under these cart conditions section:
Select Apply to specific carts
Select all of these are true:
Select Cart Total then is equal to or greater than and enter
300.00 USD
.Click AND condition.
Select At least one line item exists under Functions in the side panel. (If it’s not available, click View all predicates to reveal it).
Select all of these are true:
Select Attribute, type
Season
, then select is listed and thennew range
.Select is and then select True.
Cart Discount effects
- In the Discount value section enter $25.
- With Cart discount effect, because we want to apply the $25 discount on the new season items, Item is already selected.
- Create a Target predicate as listed in the image below.
The steps would be:
- Select Apply to specific items
- Select all of these are true:
- Select Attribute, type
Season
, then select is listed and thennew range
. - From here select Save and don't forget to activate the Cart Discount otherwise it will not be applied.
Some things to note:
- We could also have approached 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 fine approaches for creating this type of discount.
- We have chosen is listed instead of is here, as is means ‘is only’. If an item found itself in the situation of having the new range attribute but also another attribute, the discount would not apply to that item.
Here in our image we can see the discount being applied to the Cart.
Nice work! Let’s look at another example.
Use case 3: Create an account discount
Tread Trends has decided recently that they would like to encourage more of their Customers to sign up to their website and create an account. They are offering a 5% discount to customers on non-sale items to motivate their customers to do so. What would this discount look like in Composable Commerce?
To follow this use case, you'll need to add to your Project setup the following aspects before continuing:
- A Category named
Sale
. - Two Channels named
Shoes for Feet
andTread Trends
with their Channel roles asProduct Distribution
. - Two Stores named
Shoes for Feet
andTread Trends
assigned to the Product Distribution Channels created in the previous step. - A Customer with a
CustomerID
and restricted to theTread Trends
Store (this is optional, but required if you want to test out in an order whether you were succesful in setting up the discount).
Check out Channels and Stores in our docs for information on how to set these up.
General Information
- Start with selecting the Percent off item(s) in cart Discount Template.
- Enter a Cart discount name:
Tread Trends 5 percent for new accounts
. - Select the Tread Trends Store as we want this to be specifically for Tread Trends.
- Consider whether the Rank (sortOrder) value needs to be higher or lower to enable the correct priority level. For now, let's go with 0.4999, making it a lower priority than our previous discounts.
- You may want to consider adding a Discount code for this kind of discount, as it would suit the use case. (We won't do it for this use case, but see Use Case 6 below for details on how to set up Discount codes.)
Cart Discount conditions
- Your Under these cart conditions section can be set up like in the image below. It’s more or less the same as you have seen so far, with two conditions ANDed together.
- You can see that the second condition has the Customer ID value selected, and has a value selected as the operator in the predicate. This allows the condition to evaluate whether or not the Customer has created an account or not.
Cart Discount effects
- As we are offering a 5% discount, enter the digit
5
for the Discount value. - For your Cart discount effect, enter the information as in the screenshot below. You will see here that because we want the discount to be applied to all items that are not currently under the
Sale
Category, we have used the is not operator.
Let's activate our discount and check in an order if we have set this up correctly:
We have! Great work. Let's do a quick knowledge check, and then we will continue with a few more use cases on the next page.