Unique Coupon Code Generation Scenarios

TABLE OF CONTENTS

List of Scenarios

Scenario 1: Generate Coupons for a New Promotion

System Behavior

When creating a new promotion, the Generate Coupons button is disabled by default.

Administrators must first save the promotion before coupon generation becomes available.

Steps

  1. Create a new promotion.
  2. Configure the promotion details.
  3. Click Save.
  4. After the promotion is saved successfully, the Generate Coupons button becomes enabled.
  5. Enter the coupon generation configuration.
  6. Click Generate Coupons.

Result

  • The system generates coupon codes at the database level.
  • Generated coupon codes are automatically associated with the promotion.
  • Coupon codes are stored immediately and available for review.

Help Text: Generate unique coupon codes for this promotion. Save the promotion to enable coupon generation.

Scenario 2: Save a Promotion Without Generating Coupon Codes

Steps

  1. Create and save a coupon-based promotion.
  2. Do not generate coupon codes.
  3. Click Save.

Result

The system displays the following validation message:

"Please generate coupon codes to continue."

The promotion cannot be completed until coupon codes are generated.



Scenario 3: Navigate Away Without Generating Coupon Codes

Steps

  1. Create and save a promotion.
  2. Do not generate coupon codes.
  3. Click Back.

Result

The system displays a confirmation popup.

Title

Are you sure you want to leave this page?

Message

Coupon codes have not been generated for this promotion. If you leave this page now, your changes may not be completed.

Available Actions

ButtonDescription
Leave PageLeaves the current page and discards unsaved coupon generation activity.
Stay on PageRemains on the promotion page.


Scenario 4: Edit Coupon Information Without Generating Coupons

Steps

  1. Open a saved promotion.
  2. Select Edit Coupon Code.
  3. Make coupon-related changes.
  4. Click Save without generating coupon codes.

Result

The system displays the following validation message:

"Please generate coupon codes to continue."

Additionally:

  • The Coupon Information section is highlighted in red.
  • The changes are not completed until coupon codes are generated.

Scenario 5: Generate Additional Coupon Codes for an Existing Promotion

Preconditions

The promotion already contains generated coupon codes.

Steps

  1. Open an existing promotion.
  2. Select Edit Coupon Code.
  3. Enter an additional quantity.
  4. Update the coupon format if required.
  5. Click Generate Coupons.

Result

  • Only the new quantity is generated.
  • Existing coupon codes remain unchanged.
  • Newly generated coupon codes are added to the existing coupon pool.
  • Saving the promotion before generation is not required.

Example

Current coupon count: 100

Additional quantity entered: 100

  • Existing coupon codes: 100
  • Newly generated coupon codes: 100
  • Total coupon codes: 200


Scenario 6: Exit Without Generating Additional Coupon Codes

Preconditions

The promotion already contains generated coupon codes.

Steps

  1. Open the promotion.
  2. Select Edit Coupon Code.
  3. Modify coupon quantity or format.
  4. Click Back without selecting Generate Coupons.

Result

  • Changes are not saved.
  • Previously saved coupon configuration remains unchanged.
  • No additional coupon codes are generated.

Scenario 7: Save Promotion After Coupons Already Exist

Preconditions

Coupon codes have already been generated.

Steps

  1. Open the promotion.
  2. Select Edit Coupon Code.
  3. Make updates unrelated to coupon generation.
  4. Click Save or Save & Close.

Result

The system saves the promotion successfully and displays:

"Record saved successfully."

No additional coupon generation is required.


Scenario 8: Generate Additional Coupons Without Saving First

Preconditions

A promotion already contains generated coupon codes.

Steps

  1. Open the promotion.
  2. Modify promotion settings.
  3. Update coupon quantity.
  4. Click Generate Coupons.

Result

The system automatically:

  1. Saves promotion changes.
  2. Generates additional coupon codes.
  3. Associates generated coupon codes with the promotion.

No separate Save action is required before coupon generation.

Example

Promotion: Summer Sale

Existing coupons: 100

Admin updates:

  • Promotion configuration
  • Additional quantity = 100

Upon clicking Generate Coupons:

  • Promotion changes are saved automatically.
  • 100 new coupon codes are generated.
  • Total coupon count becomes 200.


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.