Magento Open Source 2.2.x
Configuring 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 iith a specific campaign or initiative.

Auto Generated Specific Coupon Codes

To format coupon codes:

1. On the Admin sidebar, tap Stores. Then under Settings, choose Configuration.
2. In the panel on the left under Customers, choose Promotions.
3. In the Auto Generated Specific Coupon Codes section, do the following:
a. Enter the Code Length, including prefix, sufix, and separators.
b. Set the Code Format to one of the following:
  • Alphanumeric
  • Alphabetical
  • Numeric
c. To add a Code Prefix, enter the value that you want to appear at the beginning of all coupon codes.
d. To add a Code Suffix, enter the value that you want to appear at the end of all coupon codes.
e. To insert a 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.
4. When complete, tap  Save Config.