Cart Discounts
Managing Discounts applied to a Customer's Cart
A Cart Discount applies to a Cart's Products or other aspects of the Cart, like shipping fees. They are applied after adding a Product to the Cart in the order of their Rank (sortOrder) value. The Do not apply any further cart discounts after this one option stops Cart Discounts (ranked lower than Rank (sortOrder) value) from applying.
They are useful when creating Discounts for the following scenarios:
- Free shipping discounts or free shipping over a certain cart amount
- Seasonal sales for a group of products
- Membership or customer group discounts
The number of active Cart Discounts in a Discount Code is limited to 10
.
The number of active Cart Discounts that do not require a Discount Code is limited to 100
. For Stores, the number of active Cart Discounts that do not require a Discount Code is limited to 100
. Thus, the overall limit of active Cart Discounts that do not require a Discount Code is 100
+(100
*number of Stores in a Project).
Create a Cart Discount
You can create two types of Cart Discounts:
Numeric: applies a relative, absolute value, or fixed price Discount to a Cart. The numeric Cart Discounts are useful in the following scenarios:
- Relative: "10% off everything" sales
- Absolute: get $30 off, when you spend $300
- Fixed Price: get 2 bananas at $4
Gift Line Item: adds one quantity of a specific Product to the Cart. Gift Line Item Cart Discounts are useful in the following scenarios:
- free gift with purchase discounts
- "Buy one get one" discounts
Numeric
To create a numeric Cart Discount, do the following:
Go to Discounts > Add discount or Discounts > Cart discount list in the Merchant Center main menu.
Click Add cart discount.
Select Numeric in the Cart discount type field.
Specify the values for the following fields:
- Cart discount name (required): the display name for the Discount that can be localized.
- Cart discount description: a plain-text description of the Discount that can be localized.
- Cart discount key: a unique identifier key for the Discount.
- Store: Stores on which the Cart Discount can be applied. Enter the Store key or select from the drop-down.
You can include up to500
Stores for a Cart Discount. - Rank (sortOrder) (required): the relative importance of the Discount as a decimal value from 0 to 1. A larger value ranks higher.
- Do not apply any further cart discounts after this one: If selected, the API stops applying Cart Discounts lower than the value in the Rank (sortOrder) field.
- Discount code: determines if a discount code is required or not.
- Valid from: the date/time from which the Discount is valid to apply to a Cart.
- Valid until: the date/time until which the Discount is valid to apply to a Cart.
In the Discount configurations section, follow these steps:
- In the Under these cart conditions section, configure the conditions.
- In the Apply these discount effects section, configure the discount effect.
Click Save.
Discounts are always created in the deactivated state, and must be activated to take effect.
To learn to create a relative Cart Discount based on an example, refer our tutorial.
Gift Line Item
To create a Gift Line Item Cart Discount, do the following:
Go to Discounts > Add discount or Discounts > Cart discount list in the Merchant Center main menu.
Click Add cart discount.
Select Gift line item in the Cart discount type field.
Specify the values for the following fields:
- Cart discount name (required): the display name for the Discount that can be localized.
- Cart discount description: a plain-text description of the Discount that can be localized.
- Cart discount key: a unique identifier key for the Discount.
- Store: Stores on which the Cart Discount can be applied. Enter the Store key or select from the drop-down.
You can include up to500
Stores for a Cart Discount. - Rank (sortOrder) (required): the relative importance of the Discount as a decimal value from 0 to 1. A larger value ranks higher.
- Do not apply any further cart discounts after this one: If selected, the API stops applying Cart Discounts lower than the value in the Rank (sortOrder) field.
- Discount code: determines if a discount code is required or not.
- Valid from: the date/time from which the discount is valid to apply to a Cart.
- Valid until: the date/time until which the discount is valid to apply to a Cart.
In the Discount configurations section, follow these steps:
In the Under these cart conditions section, configure the conditions.
In the Apply these discount effects section, specify the values for the discount effect:
- Product ID (required): the Product ID of the Gift Line Item. It can be found in a Product's Merchant Center URL.
- Variant ID (required): the Product Variant ID of the gift Line Item. It can be found in the Variants tab of a Product.
- Supply Channel: the supply Channel of the Product.
- Distribution Channel: the distribution Channel of the Product.
Click Save.
Discounts are always created in the deactivated state, and must be activated to take effect.
Configure Cart Discount conditions and effects
The Cart Discount condition is a set of rules or criteria that must be met for the Cart Discount to become applicable to the user's shopping Cart or Products in it. The Cart Discount effect allows you to define what aspects of the Cart will be discounted.
To configure a Cart Discount condition:
- Configure the Cart discount condition, which defines which carts are applicable for the discount.
- Configure the Cart discount effect, which defines what the discount will apply to.
Configure a Cart Discount condition
If you select Apply to specific carts in the rule builder, you can create a rule that applies a Cart Discount to a specific Cart or Products in it. To configure a condition, you must select a condition and define one or more rules for the condition.
Select a condition
You can select one of the following conditions:
- all of these are true: all rules defined must be true for the Discount to apply. The AND condition button is displayed when creating additional rules.
- all of these are not true: all rules defined must be false for the Discount to apply. The AND condition button is displayed when creating additional rules.
- at least one of these are true: any rule defined must be true for the Discount to apply. The OR condition button is displayed when creating additional rules.
- at least one of these are not true: any rule defined must be false for the Discount to apply. The OR condition button is displayed when creating additional rules.
Define a condition
A Discount condition comprises of the following:
- A predicate, which identifies data associated with a Cart.
- An operator, which checks the state of the data.
- Values, which are input to check against the predicate data.
To define a Discount condition, do the following:
Select a predicate from the first field. To change the default predicate that is displayed, click the field and, from the sliding pane, select or search for a predicate.
To know the functionality of available predicates, click View all predicates. You can then select your frequently used predicates to define a quick-select list for easier access.Select an operator from the next drop-down.
Enter or select a value (to compare to) in the input field.
The value field's input type changes based on the predicate and operator, and in some cases is not present at all.
Optionally, define a nested rule by using the AND or OR buttons.
- To create a non-nested additional rule, click AND condition or OR condition and enter your values in the input fields as required.
- To create a nested rule, click the AND condition or OR condition drop-down and select Add group condition, and then enter your values in the input fields as required.
Configure a Cart Discount effect
The Cart Discount effect defines the aspects of the cart receiving a discount. To configure a Cart Discount effect, do the following:
Select one of the following Discount effects:
Total Price: applies the Discount to the Cart total.
When other Cart Discounts with different effects apply on a Cart, the Total Price discount applies last, regardless of its sort order and ignoring the stacking setting of the other Cart Discounts. The sort order for the Total Price discount only determines its ranking among other Cart Discounts targeting the Total Price.
As a result, when the Do not apply any further cart discounts after this one checkbox is selected for a Cart Total Price discount, the application of further discounts is ignored only when there are other Cart Discounts targeting the Total Price with a lower sort order.Item: applies the Discount to Line Items or Custom Line Items in the Cart.
Buy and Get: applies the Discount when a Customer purchases multiple quantities of Line Items or Custom Line Items. For example, used for "Buy one get one" discounts.
Shipping: applies the Discount to the Cart's shipping cost.
If you selected Item or Buy and Get, configure a condition.
For Item, if you select Apply to specific items in the rule builder, select a condition and then define it.
For Buy and Get, if you select Apply to specific items in the rule builder, follow these steps.
It is more powerful and flexible than Multibuy discounts. If you prefer Multibuy discounts, see Configure multibuy discounts.
Select the Discount type—Percentage off, Amount off, or Fixed price—and a discount value.
If you selected Item and Amount off in the earlier steps, you can select how the Discount is applied for the items in the Cart:
- To distribute the Discount evenly across eligible Line Items or Custom Line Items, select Distributed evenly across all eligible items.
- To apply the Discount individually to eligible Line Items or Custom Line Items, select Applied individually to each eligible item.
- To distribute the Discount proportionately across eligible Line Items or Custom Line Items, select Distributed proportionately across all eligible items.
Configure Buy and Get Discount effects
In the Each time when cart contains section, do the following:
For Item Criteria, define a predicate.
- Select a field identifier. To change the field identifier, click the field and select or search for a field identifier.
- Select an operator from the next drop-down.
- Enter or select a value (to compare to) in the input field.
For Count, enter a value for the number of (Custom) Line Items that match the predicate.
In the Apply Discount on section, do the following:
For Item Criteria, define a predicate.
- Select a field identifier. To change the field identifier, click the field and select or search for a field identifier.
- Select an operator from the next drop-down.
- Enter or select a value (to compare to) in the input field.
For Count, enter a value for the number of (Custom) Line Items that match the predicate.
For Exclude, enter a value for the number of (Custom) Line Items to exclude on every application of the discount.
Select if the discount should apply on the cheapest or the most expensive (Custom) Line Items in the cart.
If the discount can apply multiple times on a cart, enter a value to limit the application of the discount.
Select the discount type to apply on the cart and enter a value for it.
Click Save.
Configure multibuy Discount effects
This feature is available in public beta on the Cart Discounts API.
Multibuy Line Items apply when the Customer purchases a certain quantity of Line Items, and are useful for "Buy one get one" promotions.
To configure a multibuy Line Item or Custom Line Item discount, do the following:
Select a condition option.
Configure the following fields:
- When customers buy: the total line items (quantity) a Customer must buy before applying the Discount.
- line items, they get: the quantity of Line Items to apply the Discount to. The Discount can be applied to the following, as selected from the drop-down:
- The cheapest item
- The most expensive item
- % off: automatically populated from the Discount value provided when creating a Cart Discount.
- Limit this discount to: limits the number of times the Discount can be applied if a value is provided in the Add quantity field. Select the Unlimited checkbox for unlimited use.
Activate a Cart Discount
To activate a Cart Discount, do the following:
- Select the Discount you want to activate.
- Click the Status toggle.
- Click Activate discount in the dialog.
Duplicate a Cart Discount
You can also duplicate an existing Cart Discount to save time when setting up a new Cart Discount. To duplicate a Cart Discount, do the following:
- Select the Discount you want to duplicate.
- Click Duplicate cart discount.
- Click Save.
By default, duplicated Discounts are not activated.