Add a coupon code to a promotion

Coupons make promotions available only to shoppers who enter a valid coupon code at checkout.

This section applies to both OSF and Storefront Classic. This section applies to Open Storefront Framework (OSF) and Storefront Classic.

The administration interface lets you assign only a single coupon or coupon batch to each promotion. However, you can use the Admin API to associate multiple promotions with a coupon or coupon batch. See Assign and manage coupons for more information.

You can create a single coupon that has one code or a batch of coupons that each has a unique code all based on a prefix that you specify. If you add a coupon to a promotion, shoppers must provide a valid coupon code to apply the promotion to their order.

You cannot edit a coupon code after you create it but you can delete it and create a new one. Coupon codes are case sensitive and must be unique across all promotions, even promotions that are not enabled.

On the Marketing page, you can create one coupon or batch per promotion. However, you can use the Admin API to associate more than one coupon or batch with a promotion. If a promotion has multiple coupons or coupon batches associated with it, the promotion’s Availability page displays the number of coupons and coupon batches, plus the ID for the first of each. See Assign and manage coupons for more information.

Important: If you delete all a promotion’s coupons, Commerce automatically disables the promotion until you associate it with at least one coupon or coupon batch and then re-enable it by selecting the Enabled checkbox on the promotion’s details page. See Enable and disable promotions for more information.

By default, any shopper who has a valid coupon code can use it, but you can restrict coupon usage in the following ways:

  • Limit the number of times a coupon code can be redeemed during the life of the promotion. This limitation applies to the code itself, not to individual shoppers who redeem it.
  • Limit the number of times a shopper can apply a coupon code to an order.
  • Specify that a coupon code can be used only by registered shoppers. (By default, a coupon can also be used by anonymous shoppers.) You can also limit the number of orders to which a registered shopper can apply the code.

To create a coupon or batch, follow these steps:

  1. On the Marketing page, click the promotion you want to associate with a coupon code.
  2. On the promotion's Availability tab, click Create Coupon.
  3. Create a single coupon or a batch of coupon codes:

    Select Single Code to create a coupon with a one code, then enter the coupon code. (Each coupon code must be unique; you cannot use the same one for multiple promotions.)

    Select Batch of Codes to create a batch of unique coupon codes, then enter a prefix for the codes. (Each prefix must be unique; you cannot use the same one for multiple promotions.) Enter the number of coupon codes to create.

  4. Enter the number of times a code can be used or select Unlimited to create a coupon or batch that has unlimited use during the time that the promotion is enabled.
  5. Under Number of Uses Per Order, enter the number of times a shopper can redeem this promotion on a single order or select Unlimited to allow unlimited uses on a single order.
  6. Click Create.

    Commerce creates the coupon or batch and displays options that let you further limit its use:

  7. Select Registered Shoppers Only to restrict coupon redemption to registered shoppers. (See Understand the different types of shopper to learn the difference between registered and anonymous shoppers.)
  8. Specify how many times (that is, on how many orders) a registered shopper can redeem the coupon. Under Grant to a registered shopper more than once, select No to limit the coupon to a single redemption or select Yes to let a registered shopper redeem the coupon more than once. If you select Yes, enter the number of valid orders on which a shopper can redeem the coupon.

    When you grant a coupon to a registered shopper more than once, Commerce adds a copy of the promotion to the the shopper's profile for every grant.

    Each grant applies to one order, not to one discount. If you entered a number greater than one for Number of Uses Per Order to allow the promotion to discount a single order multiple times, using the promotion on that order still counts as one grant.

View and export coupon batches

You can view information about coupons within a coupon batch by exporting the batch to CSV format. The exported spreadsheet includes each code in the batch, the coupon’s ID, the prefix you specified for the codes, the maximum number of uses, and the promotion to which the coupon is assigned.

To view and export a coupon batch, follow these steps:

  1. On the Promotions page, click the promotion whose coupon batch you want to export.
  2. On the promotion’s Availability tab, the Export button next to the coupon code.
  3. Follow your Web browser prompts to open or save the file.