Configuring Promo Code and Voucher Restrictions

Overview

This video covers the latest updates to promo code and voucher configuration, which restrict how many promo codes and vouchers can be applied to an order. Promotions are organized as a hierarchy: a collection contains promotion groups, and the groups contain the individual promo codes or promotions. The video shows how to configure the restrictions for promo codes and vouchers, and how the behavior appears in the admin and on the storefront, for one-time orders and subscriptions.

Microservices – Promo Code Stacking Configuration

For promo codes, go to the collection properties within microservices. For the store that needs the update, open the allowedPromoCodeStacking property and add the required JSON. With collectionLevel set to false, the admin or user can add any promo codes from the entire collection or from any of the promotion groups. With it set to true, the admin or user can add only one promo code from the entire collection. With groupLevel enabled, the admin or user can add only one promotion from a group, and after a promotion from one group is applied, the promotions from the other groups are disabled. In equivalentGroups, add the group IDs the restriction applies to, and only one promotion can be selected from the listed groups.

Admin – Promo Code Restriction Behavior

With the collection level property set to true and the change saved, the promo code behavior shows both the group number and the promotion number. Applying the first promotion disables all the other promotions in the collection. With the group level restriction set to true, applying one promotion disables the remaining promotions in the same group, and only one promotion from that group, shown as Group 2, can be applied. After the group level property is updated to include two groups, applying one promotion disables the promotions from both Group 2 and Group 1, because both group IDs are in the restriction.

Storefront – Promo Code Restriction Behavior

The same behavior applies on the storefront. After a promo code is applied, the remaining promo codes are disabled according to the configuration and show a not applicable label.

Cart Microservice – Voucher Stacking Configuration

For vouchers, go to the Cart collection under microservices for the store and check the enableVoucherStacking property. If it is disabled, the admin or user can apply any number of vouchers. If it is enabled, the admin must configure allowedVouchersCount, and the number entered there sets how many vouchers can be applied to an order. After saving, the behavior can be checked in both the admin and the storefront, where only one voucher can be applied under the example configuration.

Admin and Storefront – Subscriptions

The same behavior applies to subscriptions. In subscriptions, select Apply Discount, and the restriction is enforced from the saved configuration for promo codes and, in the same way, for vouchers, with the system limiting the vouchers accordingly. On the storefront, the same behavior applies for both one-time orders and subscriptions.

Timeline

  • 00:04 – Overview: promo code and voucher configuration updates
  • 00:10 – allowedPromoCodeStacking in the microservice collection properties
  • 00:22 – Promotion hierarchy: collection, promotion groups, individual promotions
  • 00:33 – collectionLevel: false allows any promo code, true allows only one
  • 00:52 – groupLevel: one promotion per group, other groups disabled once one is applied
  • 01:05 – Listing the promotion group IDs in equivalentGroups
  • 01:17 – Collection level set to true: result in the admin
  • 01:39 – Group level set to true: result in the admin
  • 01:57 – Restriction across two promotion groups
  • 02:18 – Same behavior on the storefront with the not applicable label
  • 02:30 – Vouchers: enableVoucherStacking and allowedVouchersCount in the Cart collection
  • 02:56 – Voucher limit verified in the admin and on the storefront
  • 03:13 – Subscriptions: restrictions applied through Apply Discount
  • 03:31 – Storefront behavior for one-time orders and subscriptions

For more information, see Collection Properties – Promotions and Collection Properties – Cart.

Related video: Promo Code and Voucher Updates, which shows a CSR applying and removing promo codes and vouchers under these restrictions.