How to Create and Manage Coupon Codes in Magento 2

how to create and manage coupon codes in magento 2

If you’re running an online store using Magento 2, you already know the importance of attracting and retaining customers. One effective way to do this is through the use of coupon codes. Coupons can help boost sales, clear inventory, and delight customers. But how do you set them up in Magento 2?

In this post, we’ll walk you through the process of creating and managing coupon codes in Magento 2 step by step. By the end of this guide, you’ll be equipped with the knowledge to effectively use them to enhance your online store’s success.

Let’s dive in!

How to Create Coupon Codes in Magento 2

There are 2 types of coupon codes:

  • Specific coupon code
  • Auto-generated coupon code

We will show you how to create both of them in the following sections.

Case 1: Create Only 1 Coupon Code

First, you need to create a new cart price rule.

Go to the Admin Panel, navigate to MARKETING, choose Cart Price Rule (under Promotions),and then click on the Add New Rule button.

In the Coupon box, choose Specific Coupons to create a new coupon code.

create coupon codes in magento 2

Note that you don’t check on the Use Auto Generation box. What you need to do is just add the Coupon Code (include either letters, numbers, or a combination of them), and define a number of uses per coupon/customer (optional).

Case 2: Generate Different Coupon Codes

Differing from the first case, you don’t have to add the coupon code but check on the Use Auto Generation box. Then you can set the number of uses per coupon/ customer.

create coupon code magento 2

Next, you must move to the Manage Coupon Code section. Here you must add or select:

  • Coupon Quantity: the exact number of coupon codes you want to issue.
  • Code Length: the number of characters in the code. (E.g: Coupon Code is XSHFJGJ, so the code length is 7). It’s worth noting that the code prefix, code suffix, and separators are not included in the code length.
  • Code Format: choose among Alphanumeric (both letters and numbers, e.g.: xhdk079), Alphabetical (letters only, e.g.: fsfsfsg), and Numeric (numbers only, e.g.: 4252525)
  • Code Prefix: the first part in the coupon code (e.g: if you set the prefix as “Tigren-“, so the code will appear as “Tigren-535353”)
  • Code Suffix: similar to the code prefix but the code suffix appears at the end of the coupon code (e.g: if you set the suffix as “-M2”, so the code will appear as “Tigren-53535353-M2”)
  • Dash Every X Characters: in case you generate a long coupon code, adding the dash every X character would help the customers to read and copy the code easier. (e.g: Dash every 4 characters, so the code will appear as “Tigren-5353-5353-M2”
creating coupon codes in magento 2
create a coupon magento 2

After that, you must click on the Generate button to create a batch of coupon codes as configuration. Then, it will display a list of coupon codes for you to preview. You can export this list to use for other purposes such as email marketing. Finally, save the Cart Price Rule.

How to Manage Coupon Codes in Magento 2

First, you must go to the admin panel, then navigate to REPORTS and select Coupons under Sales (Admin Panel => REPORTS => Coupons)

magento 2 coupon codes report

Second, you need to select Store View (in the top-left corner) if you own multiple store views.

create coupon codes in magento 2

Third, in order to get the latest statistics, click on the message in the yellow box.

Fourth, start to filter date to get the report by setting Date Used (Order Created & Order Updated), Period (Day/ Month/ Year), date range (from… to…), Order Status.

Besides, if you don’t want no-data rows to appear in the report, set No in the Empty Rows. In the last field – Cart Price Rule, to generate a report of all coupon activities regardless of different price rules, you must select Any option. Conversely, to display only activities happening from a specific price rule, please choose the Specified option and one of the cart price rules in the list.

coupons report magento 2

After completing the settings, click on the Show Report button in the upper-right corner. As a result, the report will be shown at the bottom of the page and you can easily export it to a CSV file.

We have shown you 2 ways to create the coupon codes as well as how to manage them in Magento 2. If you have any problems when following this tutorial, be free to ask us by leaving a comment below. See you in the next tutorial!

2 thoughts on “How to Create and Manage Coupon Codes in Magento 2

  1. Ashley Mather says:

    How can I show data for rules which do not have a coupon code? This report is only showing me data for cart rules which have a coupon code associated with them. Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *