Create a Cart Price Rule in Magento 2.x

An automation in Personal Discount needs a Cart Price Rule to which it will be adding coupon codes.

You can prepare a Cart Price Rule in your Magento admin panel.

Navigate to Marketing > Cart Price Rules and click on Add New Rule.

Magento Cart Price Rules

Cart Price Rules in Magento provide a variety of options. The essential ones are:

Rule Name - will appear on the select list in Personal Discount

Active - yes

Websites - select all, unless you want to limit the coupon to specific website

Customer Groups - select all, unless you want to limit the coupon to a specific customer group

Coupon - Specific Coupon

Use Auto Generation - checked, this is key for Personal Discount to work properly

Uses per Coupon - how many times a customer can use a coupon code

Apply - discount type, possible choices are:

  • Percent of product price discount

  • Fixed amount discount

  • Fixed amount discount for whole cart

  • Buy X get Y

Discount Amount

Save the Price Rule and switch to Personal Discount automation settings. Now, you can select the newly created "Welcome 10% off" as a Cart price rule for your automation.

The automation will start adding coupon codes to the selected Price Rule. You can find the generated coupons in the Manage Coupon Codes section of your Cart Price Rule:

You won't see expiration date in the coupon codes table, because it's a limitation of Magento API. However, Personal Discount keeps track of when the coupon should expire and removes them at a right time.