Get Free Audit

Auto-Generation of Coupon Codes in Magento 2.0

Dec 22, 2015

3453 Andrey Litvin

Auto-Generation of Coupon Codes in Magento 2.0

In order to auto-generate a coupon code, first add new cart price rule.

To add a new price rule, navigate to Marketing => Cart Price Rules.

Press “Add New Rule”. Select the conditions and actions for the rule. And if you want to auto-generate a coupon, in the section Rule Information, set the following:

Auto-Generation of Coupon Codes in Magento 2.0

Coupon: Specific Coupon.

In Coupon Code put a tick in “Use Auto Generation” box.

But how will your coupon look like and how will it work?

Navigate to Stores => Configuration.

Under Customers section, select Promotion.

Magento store.belvg.com

Magento Store

Take your online store to the next level with BelVG Magento store

Visit the store

Here you can define the following:

Auto-Generation of Coupon Codes in Magento 2.0

  • Code Length – defines the number of symbols in your code.
  • Code Format – defines the format of your code. It can be Alphanumeric, Alpabetical, Numeric.
  • Code Prefix – it’s a code that is added before all coupon codes. This code is not included in the number of symbols in a code. If you don’t want any prefix, leave the field blank.
  • Code Suffix – it’s a code that is added after all coupon codes. This code is also not included in the number of symbols in a code. If you leave it blank, there will be no suffix in your coupon codes.
  • Dash Every X Characters – if you want your coupon code to look like this: abc – def – ghi, then select “3” here. A dash will be added after every 3 caracters.

Press “Save”.

How to generate a coupon code?

Create a new one and set “Use Auto Generation”.

Configure other settings in the price rule and press “Save”.

Open a Cart price rule that is already configured (Marketing => Cart Price Rules).

Navigate to “Manage Coupon Codes” section.

Here you have the same settings as we checked above. Plus there is a “Generate” button below these settings and “Coupon Qty” above it.

Enter the number of coupons that you want to generate. And press the “Generate” button.

Vlad Yunusov
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Vlad

Auto-Generation of Coupon Codes in Magento 2.0

Magento Custom Development

Take your online store to the next level with BelVG Magento custom development

Visit the page

Now after you scroll down, you will see the list of codes.

Auto-Generation of Coupon Codes in Magento 2.0

Vlad Yunusov

Partner With Us

Let's discuss how to grow your business. Get a Free Quote.
Talk to Vlad

You can export them in a CSV file. Select the codes that you want to export and press the corresponding button.

Now you can give these codes to your clients so they could use the discount on checkout.

ecommerce development

Ecommerce Development

Take your online store to the next level with BelVG ecommerce development

Visit the page

How can you track coupon usage?

Navigate to Reports => (Sales) => Coupons

Select for what period you want to check coupon usage.

Select Cart price Rule, Select Order status and press “Show Report”.

Now you will see how many times your promo codes have been used.

Auto-Generation of Coupon Codes in Magento 2.0

Vlad Yunusov
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Vlad

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *