Coupon codes
Coupons codes are used with cart price rules to apply a discount when a set of conditions is met. For example, a coupon code can be created for a specific customer group, or for anyone who makes a purchase over a certain amount. To apply the coupon to a purchase, the customer can enter the coupon code in the cart, or possibly at the cash register of your brick and mortar store. Here are a few ways that you can use coupons in your store:
- Email coupons to customers
- Produce printed coupons
- Create in-store coupons for mobile users
Coupon codes can be sent by email, or included in newsletters, catalogs, and advertisements. The list of coupon codes can be exported and sent to a commercial printer. You can also create in-store coupons with a quick response code that shoppers can scan with their smart phones. The QR code can link to a page on your site with more information about the promotion.
As of Commerce 2.4.7, shoppers can apply multiple coupons to a cart. Merchants can also apply multiple coupons using shopping assistance.
Configure coupon codes
The length and format of automatically generated coupon codes is controlled by the configuration. The characters can be set to all numbers, all letters, or a combination. You can insert a dash at set intervals to make it easy to read, and add a prefix and suffix to associate the code with a specific campaign or initiative.
-
On the Admin sidebar, go to Stores > Settings > Configuration.
-
In the left panel, expand Customers and choose Promotions.
{width="600" modal="regular"}
-
Expand the Auto Generated Specific Coupon Codes section.
{width="600" modal="regular"}
-
Enter the Code Length, including prefix, suffix, and separators.
-
Set the Code Format to one of the following:
Alphanumeric
Alphabetical
Numeric
-
For Code Prefix, enter the value that you want to appear at the beginning of all coupon codes.
-
For Code Suffix, enter the value that you want to appear at the end of all coupon codes.
-
For Dash Every X Characters, enter the number of characters between each dash.
Coupon codes with different dash patterns are considered to be different codes, even if the numbers are the same.
-
When complete, click Save Config.
Create coupons
bin/magento cron:run
command to verify that cron is running. See Run cron from the command line in the Configuration Guide for more information.Method 1: Create a specific coupon
-
Follow the instructions to create a cart price rule.
-
In the Rule Information section, set Coupon to
Specific Coupon
. -
Enter a Coupon Code to be used with the promotion.
The format of the code (numeric, alphanumeric, or alphabetical) is determined by the configuration.
-
To limit the number of times the coupon can be used, do the following:
- Enter the number of Uses per Coupon.
- Enter the number of Uses per Customer.
For unlimited use, leave these fields blank.
{width="600" modal="regular"}
note note NOTE If there is simultaneous use of the same coupon by multiple customers at the same time, it is possible that the usage limit that is set could be exceeded due to delayed coupon processing. -
To make the coupon valid for a time period, do the following:
-
(Magento Open Source only) Complete the From and To dates. To select the date, click the Calendar ( ) icon next to each field. If you leave the date range empty, the rule does not expire.
-
(۶Ƶ Commerce only) Do one of the following:
Option 1: Schedule a new update
-
Click Schedule New Update in the upper-right corner of the page.
{width="600" modal="regular"}
-
Enter the Update Name and Description.
-
Choose the Start Date and End Date from the Calendar ( ). If you leave the date range empty, the rule does not expire.
-
When complete, click Save.
{width="600" modal="regular"}
Option 2: Assign to an existing update:
-
Select Assign to Another Update.
-
Find the update in the list, and click Select.
-
-
-
Complete the cart price rule as needed.
Method 2: Generate a batch of coupons
The generation of discount coupons is an asynchronous operation, which executes in the background so that you can continue working in the Admin without waiting for the operation to finish. The system displays a message when the task is complete.
-
Follow the instructions to create a cart price rule.
-
Under Coupon Code, select the Use Auto Generation checkbox.
-
To limit the number of times each customer can use the coupon, enter the number of Uses per Customer.
{width="600" modal="regular"}
note note NOTE If there is simultaneous use of the same coupon by multiple customers at the same time, it is possible that the usage limit that is set could be exceeded due to delayed coupon processing. -
Scroll down and expand the Manage Coupon Codes section and do the following:
{width="600" modal="regular"}
-
For Coupons Qty, enter the number of coupons that you want to generate.
-
Enter the Code Length, not including the prefix, suffix, or separators.
-
Set the Code Format to one of the following:
Alphanumeric
Alphabetical
Numeric
-
(Optional) Enter a Code Prefix to be added to the beginning of the code.
-
(Optional) Enter a Code Suffix to be added to the end of the code.
-
(Optional) For Dash Every X Characters, enter the number of characters between each dash. For example, if the code is 12 characters long, and there is a dash every four characters, it looks like
xxxx-xxxx-xxxx
. Dashes make codes easier to read and enter.
-
-
When complete, click Generate.
The system displays
Message is added to queue, wait to get your coupons soon
.After the cron job completes, the list of generated codes is displayed.
table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2 layout-auto Field Description Coupon Code A unique code of coupon that was created and can be used for receiving special conditions. Created The date when the coupon code was created. Used Indicates if the coupon was used. Times Used Indicates how many times that the coupon code was used.
You can export coupon codes to a CSV or Excel XML file by selecting the file format and clicking Export.
To delete coupon codes, select one or more codes from the list. Select Delete
from the Actions selector, and then click Submit.
Coupons report
The Coupons report aggregates data from each coupon that is used during a specific date range. Because coupons are applied from the shopping cart, the report includes data from all redeemed coupons, regardless of order status. As a result, the report might include both projected and actual totals. The report can be filtered for a specific store view, time period, order status, and cart price rule.
In the following example, the coupon code “H20” was used by two customers. One of the orders is invoiced, but the other is still pending. The projected Sales Subtotal, Sales Discount, and Sales Total columns show the aggregated amounts from both orders, but only the actual invoiced order appears in the Subtotal, Discount, and Total columns. Each row in the report represents a single coupon promotion.
{width="600" modal="regular"}
Run the report
-
On the Admin sidebar, go to Reports > Sales > Coupons.
-
If you have multiple store views, set Store View in the upper-left corner to establish the scope of the report.
-
To refresh the sales statistics for the day, click the Last Updated message at the top of the workspace.
Next, click to select the Coupons checkbox and click Refresh.
{width="600" modal="regular"}
-
To filter the data, do the following:
{width="600" modal="regular"}
-
Set Date Used to one of the following:
Order Created
Order Updated
The Order Updated report is created in real time and does not require a refresh.
-
To define the time period covered by the report, set Period to one of the following:
Day
Month
Year
-
To define the date range of the report, enter the From and To dates in M/D/YY format.
-
To print a report for a specific order status, set Order Status to
Specified
and choose the order status from the list. -
To omit rows without data from the report, set Empty Rows to
No
. -
To define coupon activity included in the report, do one of the following:
- To include all coupon activity from all price rules, set Cart Price Rule to
Any
. - To include only activity related to a specific price rule, set Cart Price Rule to
Specified
and select the cart price rule in the list.
- To include all coupon activity from all price rules, set Cart Price Rule to
-
-
When ready to run the report, click Show Report.
The report appears at the bottom of the page.
Filter options
Order Created: Generates the report based on the date that the order was placed by the customer. To ensure that the most current data is included, click the link in the message to refresh statistics.
Order Updated: Generates the report based on the date orders were last updated. This report uses real-time data and does not require statistics to be refreshed.
Day
/ Month
/ Year
Any: Includes all orders regardless of status.
Specified: Includes only orders with the specified status. Canceled orders are not included in the report.
Yes
/ No
Any: Includes order information for any coupon promotion that was used during the specified date range.
Specified: Includes only order information for the selected coupon promotion during the specified date range.
Report columns
Day
: 6/21/19Month
: 6/2019Year
: 2019The Sales Subtotal represents the aggregated Subtotal from all qualifying orders and includes
Pending
sales orders that are not yet invoiced.The Discount represents the aggregated discount amount from all qualifying orders and includes
Pending
sales orders that are not yet invoiced.The Sales Total represents the aggregated Grand Total amount from all qualifying orders and includes
Pending
sales orders that are not yet invoiced. The value includes the Subtotal plus Shipping and Handling, less the Discount, plus Tax.Calculated by:
((Subtotal + Shipping & Handling) - Discount) + Tax