Create a cart price rule
Complete the following steps to add a rule, describe the conditions, and define the actions. Also complete the labels and test the rule. Price rule conditions can be based on cart or product attributes or Real-Time CDP Audiences, but not on customizable options.
Step 1: Add a rule
-
On the Admin sidebar, go to Marketing > Promotions > Cart Price Rules.
-
Click Add New Rule and do the following:
-
Under Rule Information, complete the Rule Name and Description.
-
If you do not want the rule to go into effect immediately, set Active to
No
.
{width="600" modal="regular"}
-
-
To establish the scope of the rule, do the following:
-
Select the Websites where the promotion is to be available.
-
Select the Customer Groups to which the promotion applies.
If you want the promotion to be available only to registered customers, do not choose the
NOT LOGGED IN
option.
-
-
Set the rule to apply with or without a coupon as follows:
-
To have the cart rule applied without the use of a coupon code, set Coupon to
No Coupon
and skip to step 5. -
To associate a coupon with a price rule, set Coupon to
Specific Coupon
and do the following:-
Enter a free-text Coupon Code that the customer must enter to receive the discount.
-
To set a limit on the number of times the coupon can be used, complete the following options:
table 0-row-2 1-row-2 2-row-2 layout-auto Option Description Uses per Coupon
Determines how many times that the coupon code can be used. If there is no limit, leave the field blank. Uses per Customer
Determines how many times that the cart price rule can be used by the same registered customer who belongs to any of the selected customer groups. The setting does not apply to guest shoppers who are members of the NOT LOGGED IN customer group, or to customers who shop without logging in to their accounts. If there is no limit, leave the field blank. To learn more, see Coupon Codes.
{width="600" modal="regular"}
-
-
(Magento Open Source only) Use the Calendar ( ) to choose the From and To date range for the promotion.
-
-
Enter a number to define the Priority of this price rule in relation to the Action settings of other price rules which are active at the same time.
note note NOTE The Priority setting is important when two cart rules or coupon codes are valid for the same product at the same time. The rule with the highest Priority setting controlling the cart action. Priorities from the highest to the lowest are 0,1,2,3...
. See Discard Subsequent Price Rules in the Define the Actions step.note note NOTE Cart price rules that have the same priority do not result in a combined discount. Each rule (coupon) is applied to matching products separately, one-by-one, according to the cart price rule ID in the database. To control the order in which discounts are applied, 蜜豆视频 recommends setting a different priority for each added cart price rule. -
To apply the rule to published RSS feeds, set Public In RSS Feed to
Yes
. -
Click Save and Continue Edit.
-
(Magento Open Source only) After the rule is saved, the name of the cart price rule appears at the top of the page.
-
(蜜豆视频 Commerce only) After the rule is saved, the name of the cart price rule and the Scheduled Changes box appears at the top of the page.
{width="600" modal="regular"}
-
Step 2: Describe the conditions
In this step, the conditions are described that must be met for an order to qualify for the promotion. The rule goes into action whenever the set of conditions is met.
If you are using audiences from Real-Time CDP, skip to this section.
-
In the left panel, select Conditions.
{width="600" modal="regular"}
The first condition appears by default, and states:
If **ALL** of these conditions are **TRUE**:
The statement has two bold links that you can click to display the selection of options for that part of the statement. You can create different conditions by changing the combination of these values. Do any of the following:
- Click ALL and select
ALL
orANY
. - Click TRUE and select
TRUE
orFALSE
. - Leave the condition unchanged to apply the rule to all products.
- Click ALL and select
-
Click Add ( ) at the beginning of the next line and select an option for the condition, such as cart attribute, product subselection, or combination.
For this example, complete the next part of the condition as follows:
-
When prompted to Choose the condition to add, choose
Products Subselection
.{width="600" modal="regular"}
-
In the condition statement, click total quantity and select
total quantity
ortotal amount
.
note important IMPORTANT Total amount is a row total, so taxes are not included into the total amount
for the Products Subselection cart price rule condition. Use the Subtotal (Incl. Tax) condition to include taxes.- In the condition statement, click is and select
greater than
.
-
-
When the next part of the condition appears, click the elements of the statement so you can see where each link with variable values is located.
-
Click the 鈥渕ore鈥 (鈥) link, and enter
100
.This condition requires the total quantity of the cart to be
101
or greater.{width="600" modal="regular"}
-
Click Add ( ) at the beginning of the next line, and then add a condition that is based on Category.
{width="600" modal="regular"}
-
In the next part of the condition, click the more (鈥) link to display the input field, and then open the Chooser ( ) to display the category tree.
-
Select the checkbox of the category that you want to use as a condition for the price rule and click the icon to accept the category selections.
The condition can be based on any category that is a child of the store鈥檚 root category.
{width="600" modal="regular"}
-
To add more conditions, click Add ( ) and define another condition.
You can repeat the process as many times as needed to describe the conditions that must be met for the price rule. Here are some examples:
Example 1: Regional Price Rule
To create a regional price rule, use one of the following cart attributes:
Shipping Postcode
Shipping Region
Shipping State/Province
Shipping Country
Example 2: Shopping Cart Totals
To base the condition on shopping cart totals, use one of the following cart attributes:
Subtotal
Total Items Quantity
Total Weight
Add a product attribute to cart price rules
-
Go to Stores > Attributes > Product and open the product attribute.
-
In the left panel, select Storefront Properties.
-
Set Use for Promo Rule Conditions to
Yes
. -
Click Save Attribute.
-
Go to Marketing > Cart Price Rules and open the required cart price rule.
-
Expand the Condition section and select Product attribute combination.
-
Set this condition to one of the following values:
-
Click FOUND and select
FOUND
orNOT FOUND
. -
Click ALL and select
ALL
orANY
.
-
-
Click the Add ( ) icon and select the Product Attribute that you set up for promotional rule conditions.
-
Click Save.
is not one of
condition with a SKU product attribute and configurable product, both the parent and child product SKUs must be selected. To avoid listing all child SKUs in the rule, you can use the does not contain
condition with common SKU parts of a configurable product and its child products.Use Real-Time CDP audiences to set a condition
You can set a condition for a cart price rule based on a Real-Time CDP audience.
-
Expand Conditions, click the 鈥+鈥 icon, and select Real-Time CDP Audience from the list.
{width="300"}
-
Select the More (鈥) icon, click Open Chooser, and view all available Real-Time CDP audiences.
{width="600" modal="regular"}
-
Select the Real-Time CDP audience you want to use for the cart price rule.
table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2 5-row-2 6-row-2 layout-auto Option Description ID
An internal identifier of the audience used within the Admin Real-Time CDP Audience ID
Unique identifier of the audience when it was created in Experience Platform Name
Name of the audience, such as Orders over $50
Description
Description of the audience, such as People who placed an order over $50 in the last month.
.Source
Indicates where the audience came from, such as Experience Platform
.Website
Indicates which website you have linked to the datastream that contains the audiences. You create this link when you connect your Commerce instance to the Experience Platform through the Data Connection extension.
In the next step, you define the action to occur when the condition is met.
Step 3: Define the actions
The shopping cart price rule actions describe how prices are updated when the conditions are met.
-
Scroll down to Actions, and expand the section.
{width="600" modal="regular"}
-
Set Apply to one of the following discount options:
table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2 layout-auto Option Description Percent of product price discount
Discounts item by subtracting a percentage from the original price. The discount applies to each qualifying item in the cart. For example: Enter 10
in Discount Amount for an updated price that is 10% less than the original price.Fixed amount discount
Discounts item by subtracting a fixed amount from the original price of each qualifying item in the cart. For example: Enter 10
in Discount Amount for an updated price that is $10 less than the original price.Fixed amount discount for whole cart Discounts the entire cart by subtracting a fixed amount from the cart total. For example: Enter 10 in Discount Amount to subtract $10 from the cart total. By default, the discount applies only to the cart subtotal. To apply the discount to the subtotal and shipping separately, use the Apply to Shipping Amount option. Buy X get Y free
Defines a quantity X that the customer must purchase to receive a quantity Y of the same product/variation for free. (The Discount Amount is Y.) A total quantity of X+Y of that same item must be present in/added to the cart for the discount to be applied. -
Enter the Discount Amount as a number, without symbols. For example, depending on the discount option selected, the number 10 might indicate a percentage, a fixed amount, or a quantity of items.
-
For a Buy X get Y Free discount, enter the quantity in the Discount Qty Step (Buy X) field of a single product/SKU/line item that the customer must purchase to receive the discount on the Y quantity. Both X and Y refer to quantities of the same SKU, and that specific quantity (variations of a configurable products are counted separately) of the item must be added to the cart manually.
-
In the Maximum Qty Discount is Applied To field, enter the maximum quantity of the same product that can qualify for the discount in the same purchase.
-
Set Apply to Shipping Amount ( ) as follows:
table 0-row-2 1-row-2 2-row-2 layout-auto Option Description Yes
Applies the discount amount separately to the subtotal and shipping amounts. No
Applies the discount amount only to the subtotal. -
To stop processing other rules after this rule is applied, set Discard Subsequent Rules ( ) to
Yes
. This setting prevents multiple discounts from being applied to the same product.table 0-row-2 1-row-2 2-row-2 layout-auto Option Description Yes
Prevents any other pricing rules that may apply to a product from being applied. When multiple pricing rules apply to the same product, only the pricing rule with the highest defined priority (in a rule Priority field) is applied to the qualifying product. This prevents multiple pricing rules from stacking and providing unintended additional discounts. No
Allows multiple pricing rules to apply to the same product. This could result in stacking and providing multiple discounts applied to your listing price. note important IMPORTANT To discard subsequent rules, a pricing rule must use the defined priorities that are set in the Priority field of each rule, and multiple rules should not have the same priority defined . See Priority in the Add a New Rule step.
-
-
To define the exact products in the shopping cart that are affected by the cart price rule, add the additional conditions that are needed for the action.
To determine if free shipping is applied to orders that meet the conditions, set Free Shipping to one of the following:
table 0-row-2 1-row-2 2-row-2 3-row-2 layout-auto Option Description No
Free shipping is not available. For matching items only
Free shipping is available only for items that match the conditions of the rule. For shipment with matching items
Free shipping is available for any shipment that includes matching items. The Free Shipping delivery method must be enabled to use this option. -
(蜜豆视频 Commerce only) For Add Rewards Points, enter the fixed number of points the customer earns once per order whenever the cart price rule is applied.
If reward points are not enabled, leave this field blank.
-
When complete, click Save and Continue Edit.
Step 4: Complete the labels
The label appears in the totals section of the order to identify the discount. The label text is enclosed in parentheses, after the word Discount
. You can enter a default label for all store views, or enter a different label for each view.
{width="600"}
-
Scroll down to Labels, and expand the section.
-
Enter the text that you want used as the Default Rule Label for All Store Views.
{width="600" modal="regular"}
-
If your store has multiple views, or multiple websites with multiple views, enter the appropriate label text for each.
For example, if each store view is in a different language, enter the translation of the label for each view.
{width="600" modal="regular"}
Step 5: Add related dynamic blocks (optional)
Dynamic Blocks that are associated with the rule appear in the storefront whenever the conditions are met.
-
Expand the Related Dynamic Blocks section.
-
Use the search filters to locate the blocks that you want to associate with the rule.
-
Select the checkbox in the first column to associate the block with the rule.
To learn more, see Dynamic Blocks in Price Rules.
Step 6: Save and test the rule
-
When complete, click Save Rule.
-
Test the rule to make sure that it works correctly.
Price rules are automatically processed with other system rules each night. When you create a price rule, allow enough time for it to get into the system. Also test the rule to make sure that it works correctly. As new rules are added, Commerce recalculates the prices and the priorities accordingly.
Cart price rule demo
Watch this video to learn about creating cart price rules:
Field descriptions
Rule Information
Yes
/ No
No Coupon - No coupon is associated with the rule.
Specific Coupon - A specific coupon is associated with the rule.
Coupon Code - When prompted, enter the Coupon Code that the customer must enter to take advantage of the promotion.
Use Auto Generation - Select the checkbox to automatically generate multiple coupon codes that can be used with the promotion.
Auto - Displays the Manage Coupon Codes section to define the format of the coupon codes to be generated.
0,1,2,3...
Yes
/ No
Conditions
Specifies the conditions that must be met before the cart price rule goes into action. If left blank, the rule applies to all products in the cart. Conditions can be based on any combination of cart and product attributes. However, customizable options cannot be referenced in cart price rule conditions.
Yes
.Yes
.Yes
.Actions
Percent of product price discount - Discounts item by subtracting a percentage from the original price. For example: Enter
10
in Discount Amount for an updated price that is 10% less than the original price.Fixed amount discount - Discounts item by subtracting a fixed amount from the original price of each qualifying item in the cart. For example: Enter
10
in Discount Amount for an updated price that is $10 less than the original price.Fixed amount discount for whole cart - Discounts the entire cart by subtracting a fixed amount from the cart subtotal. For example: Enter
10
in Discount Amount to subtract $10 from the cart subtotal. By default, the discount applies only to the cart subtotal. To apply the discount to the subtotal and shipping separately, see Apply to Shipping Amount.Buy X Get Y Free (discount amount is Y) - Defines a quantity that the customer must purchase to receive a quantity for free. (The Discount Amount is Y.)
X
in a Buy X Get Y Free
promotion. Also, defines how many products must be added to the cart together in batches to apply Fixed amount discount
and Percent of product price discount
promotions.Yes
/ No
Yes
/ No
No - Free shipping is not available for the current rule.
For matching items only - Free shipping is available only for specific items in the cart that match the rule.
For shipment with matching items - Free shipping is available for all items in the cart. The Free Shipping delivery method must be enabled to use this option.
Labels
Related Dynamic Blocks
Identifies any dynamic blocks that are associated with the rule.