Promotion Rules in Magento 2: Comprehensive Guide

Table of Content

promotion-rules-in-magento-2-comprehensive-guide

Magento promotion rules can be an effective sales driver. Today, I am going to focus on discounts as a means of customer activation and retention. I offer this guide for those planning to take Magento 2 Certified Solution Specialist or similar exams.

Please note that I explain the topic with examples from Magento 2.  

Let us get started!

When you want to offer a discount, you need to change the price of the product. The problem is, one does not simply modifies the cost of every single product. It is more handy to do it in a bulk.

Magento 2 promotion rules represent the bulk of the discount idea. Instead of dealing with single products, you can run an automated discount algorithm.

Magento 2 promotions and discounts

When you want to offer a discount, you need to change the price of the product. The problem is, one does not simply modifies the cost of every single product. It is more handy to do it in a bulk.

Magento 2 promotion rules represent the bulk of the discount idea. Instead of dealing with single products, you can run an automated discount algorithm.

Examples:

  • 10% off for any hoodie (applied for all the hoodies automatically);
  • $5 off for any pair top+bottom (pairs are caught automatically);
  • Buy one jacket and get one for free;
  • Every 3 items just for $100;
  • For loyal customers, 10% for everything.

There are two levels of promotions in Magento: cart level and catalog level.

Catalog-level promotions modify the price of the product itself. The discount is applied before adding anything to the cart. Like in offline commerce, a store manager can inform shoppers about the sale by crossing out the “old” price and showing the better price right on the product page.

Example: $10 off for any jacket. It does not matter
how many jackets you buy, what else is in the cart, etc.

Cart-level promotion helps to offer a better price for particular orders, and the discount is applied on the cart page only.

Example: buy 4 and get 1 free. You can get one item
for free only if you have four or more products added to the cart. If you have three products, the
promotion will not be activated.

Regardless of the level, we need to define products under promotions and triggering events. In Magento, this filtering is powered by rule conditions.

Promotion Rules in Magento 2: what is a rule condition?

A rule condition is a statement which may be true or false in any particular case. They are used to filter something or specify a start event.

Examples:

  1. Subtotal equals or greater than 100;
  2.  Shipping State/Province is Vermont;
  3.  Red T-shirt is in the cart;
  4.  Payment method is Stripe;
  5.  Customer group is Loyal;
  6.  Shipping method is FedEx Express.

Note that rule conditions are used not only in promotions. They are also used in:

  1. Magento 2 Reward Points
    How is it used? Customers can get cash-back-style points to be used for future purchases. Rules help to organize the flow of earning points.
  2. Magento 2 Up-Sells
    How is it used? The conditions are used to automatically specify upsells. For example, you can show a product as related if material is same as current product material.
  3. Magento 2 Visual Merchandiser
    How is it used? The plugin helps to assign products to the category automatically. So, if color is red, the product is automatically assigned to “Red” category and shown on its storefront page.
  4. Magento 2 Abandoned Cart Email
    How is it used? The module tracks incomplete carts to send reminders. Rules are used to run personalized email campaigns.
  5. Magento 2 Follow Up Email 
    How is it used? Rules are used to generate triggered emails based on the customer’s activity.
  6. Magento 2 Extra Fee
    How is it used? Rules allows taking commission for specific purchases, for example, the ones paid via PayPal.
  7. Magento 2 Shipping Suite
    How is it used? Conditions are used to filter orders and offer special shipping price and magento 2 shipping discounts for some clients. For example, you can offer free shipping for $50+ orders.
  8. Magento 2 Customer Group Catalog
    How is it used? The extension allows hiding some products for different website visitors. Using the rules, you can show VIP products only to Silver, Gold or Platinum customer groups.

Condition combinations: how do conditions work together?

Magento allows combining these conditions to get more flexible filtering.

Let’s consider an example here.

If we use “ANY of the conditions are TRUE”, it is enough that one of the low-level conditions (3) is true. Here’s another example:

At Amasty, we love a customer if ANY of these conditions are TRUE
(i.e. one even is enough):
– This is a new customer.
– This is an existing customer.

If we use “ALL”, every single low-level branch should be true. If even one is FALSE, the entire high-level condition becomes FALSE  too.

My fiancée Yulia kindly suggested a nice example for this case:

The wedding party is perfect if ALL of these
conditions are TRUE:

  • All my friends and immediate family will attend the event;
  • I love my future husband so much;
  • I know he loves me too;
  • I have a well-planned seating chart;
  • If the total quantity equals or less than 10 for a subselection of guests at the wedding matching
    ALL of these conditions:

     

    • Guest is in the category “I did not want to invite actually, but I had to because… you
      know”.

In case even one the conditions above FALSE, the wedding is not perfect anymore.

Trigger vs target: what is the difference between conditions and actions?

A rule, whatever it is (promotion rule, shipping rule, upsell product rule, etc.), usually consists of two parts – Сonditions and Actions. These sections may confuse anyone because they seem quite alike. Their naming may vary depending on the rule types but the key difference remains the same.

Conditions (i.e. triggers, environment conditions, activation events) are supposed to specify when we apply a rule. Normally, this is an event or a state.

Examples:

  • When a customer is in a certain customer group;
  • When a subtotal is equal to or greater than $X;
  • When there are at least two T-shirts in the cart.

Actions (i.e. product conditions, target scope) are to specify the behavior type and the target scope for your rule. Normally, they are products in the catalog.
The statement is the attribute filter.

Examples:

  • SKU is red-xs-t-shirt;
  • Color is Yellow;
  • Quantity in the cart is 5;
  • Category is Sale.

The rule may be applicable, but there are no items to apply it to. And vice versa – the target scope may be not empty, but the rule triggers are not activated, so the rule doesn’t apply.

Catalog-level discounts in Magento 2

As I have already mentioned, catalog-level promotions are applied before adding anything to the cart. They do not have any triggers for starting. Let us consider all of them.

Product-level pricing

Product pricing is a default functionality of Magento. It includes tier pricing and special pricing.

There are no conditions or rules: product-level pricing just allows setting a special promotion at the level of a particular product.

To learn more, please refer to Magento DevDocs.

Catalog price rules

The catalog price rule extends special pricing. It allows setting bulky sales for a catalog subselection.

Here we use conditions to define a target scope:

Activation triggers are not applicable here; the only exception is the start and the end date:

To learn more, please refer to Magento DevDocs.

Cart price rules in Magento 2

A cart price rule is a rule that calculates discounts on the cart page. While catalog-level promotions modify the price of the product itself, these promotions change cart subtotal.

Example: we want to offer 10% off for $100 orders.
If the order subtotal is $90, there should be no discount.

To apply this discount to particular orders only, we need to filter such orders. In this case, catalog price rule is not a good tool because it will offer 10% off regardless of the subtotal. This is where conditions and actions appear.

In its out-of-the-box edition, Magento offers four types of cart price rules. To learn more about cart price rules in Magento 2, please refer to Magento DevDocs.

Promotion solutions from Amasty

Native Magento rules work well. Yet, they aren’t always flexible enough to attract customers. And here Magento extension providers step in to help retailers tailor discounts to engage most picky customers.

Below I describe some promotion solutions from Amasty along with the problems they help to solve.

Magento 2 Custom Promo Conditions

Problems addressed:

  • How to get more options in the conditions tree?
  • How to use sales history as a condition?

Magento in its out-of-the-box edition provides basic conditions like “Subtotal is greater than”, “Items
in the cart are”, etc.

This product enables about 20 new types of flexible conditions relying on numerous sources, such as:

  • Purchase history (number of completed orders, lifetime sales, membership days, etc.);
  • Customer properties (date of birth, gender, where you found us, etc.);
  • Checkout form entries (payment method, delivery, etc.);
  • Custom checkout fields;
  • Custom account fields.

These conditions are added wherever a rule takes place: Extra Fee, Shipping Suite, email extensions and more.

Magento 2 Customer Segmentation

Problems addressed:

  • How to get more options in the conditions tree?
  • How to make your offers individualized?
  • How to run personalized email campaigns?

In Magento, every customer is assigned to a group. This attribute is static and supposed to be changed manually only.

Customer segment is a dynamic entity. It allows grouping customers by conditions:

  • People who viewed HP laptops;
  • People who have a birthday soon;
  • People who buy 3+ books monthly;
  • People who registered 1+ year ago;
  • Inactive users: no orders for 50+ days.

Like in Amasty’s Custom Conditions, segments can be used wherever rules take place.

From my own support experience, segments make the best supplementary email solutions:
abandoned cart reminders and
follow-up notifications.

Magento 2 Special Promotions

Problems addressed:

  • How to get more promotion types?
  • How to run advanced discounts calculations?

This module is to add more promotions types to your Magento webshop. By default, Magento has only 4 promotions types. The module offers more than 15 additional cases.

Examples:

  • Discounts for each Nth product (like each second 50% off);
  • Discounts for groups (like buy 3 products, get $10 off);
  • Discounts for product sets (like buy A, B, and C together just for $99);
  • Dependant discounts (Buy product X, get discount for product Y).

Functionality of Custom Conditions module is included into Pro version of Special Promotions.

Magento 2 Free Gift

Problems addressed:

  • How to give away a free sample?
  • How to upsell non-free products?

This module adds some additional promotion types. Key feature is adding new products to the cart.

Examples:

  • Automated giving free sample for every purchase;
  • Automated giving free supplements (like buy a mobile phone and get a free case);
  • Automated giving one item for free;
  • Automated adding non-free products to the cart.

Magento 2 Multiple Coupons

Problems addressed:

  • How many coupon codes can be applied per order?

Magento in its out-of-the-box edition allows to use 1 coupon code per order only. This extension resolves this problem.

Key features:

  • Applying a number of codes simultaneously;
  • Making particular coupon codes unique by making them applicable individually only.

Magento 2 Promo Banners and Product Labels

Problems addressed:

  • How to inform my customers about ongoing offers?

These modules help to highlight your ongoing promotions by showing banners or highlighting products.

Key functionality:

  • Adding ribbons for on-sale products;
  • Showing banners in the catalog, product pages and even cart pages;
  • Contextual banners: showing different banners regarding a product in the cart.

Example: when sunglasses are in the cart, you see “Best clothes for this summer” ad.

Sum-up

Rule conditions may be really tricky and complicated, but they are also useful and the game is worth
it.

I hope this complete overview will make it clear for you.

In case you’ve got any questions, please drop us a line below.

Wish you good sales!

July 12, 2019
July 17, 2019
July 8, 2019
Comments
Angel
January 30, 2020
Hello Alexander, thanks for this guide. I need your help, I 've been working with Amasty a short time ago, so my trouble as below: I have many items and each one has two cart rules at the same time. Buy 2 and get 1 FREE and Buy 3 and get 2 FREE. Each rule would be applied when items quantity is 2 or is >= 3. However, If I add 3 or more items to cart. In the checkout's summary it's appearing both rules applied as discount amount. Then I have 3 free items instead 2 items. That's so wrong The correct way would be to apply correspondent rule, if I just have 2 items then just must be applied first rule,but if I have 3 or more items, the second rule should be applied. How I must to configure this rules to show the correct amount to pay and correct discount amount in checkout summary
Reply
Polina Litreyeva
January 31, 2020
Hello, Angel! Thanks for using our extension and for the comment. You see, it’s difficult to answer here in the comments. Please, contact our <a href="https://amasty.com/contacts/">support team</a>. We'll see what we can do. Thanks in advance!
Andrew Grant
August 21, 2020
Hi, I've been asked to look into if there is anyway to ensure that a particular discount code will only work for customers who have placed 1 or more orders before with us. The intention is to avoid the sharing around of discount codes that people receive through welcome email campaigns etc. Is there any way to do this?
Reply
Alina Bragina
August 31, 2020
Hi Andrew, yes, you can set rules for giving a discount code only for those customers who have already bought at your store. <a href="https://www.youtube.com/watch?v=0sS0FbGVC60" rel="nofollow">Watch this video guide</a> or <a href="https://amasty.com/docs/doku.php?id=magento_2:special-promotions">read the manual</a> on how to set up the restrictions and rules. If there's anything else we can help you with, feel free to drop a line via the online chat on our website or create a <a href="https://amasty.com/contacts/">ticket for support</a>.
Leave your comment

Your email address will not be published

This blog was created with Amasty Blog Pro

This blog was created with Amasty Blog Pro