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.
-
Expand the Auto Generated Specific Coupon Codes section.
-
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.
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:
-
-
Option 1: Schedule a new update
-
Click Schedule New Update in the upper-right corner of the page.
-
Enter the Update Name and Description.
-
Choose the Start Date and End Date from the Calendar (
-
When complete, click Save.
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.