Skip to main content
Use Reject Discount Codes when a merchant wants AIOD to block specific discount codes after matching rule conditions are met. This is a top-level template. In Shopify admin, open Apps > AIOD Discount & Gift > Discount Templates. Reject Discount Codes appears under Explore more discount templates; click Create to open the form. There is no longer an Advanced Rules parent card or Select type step. The template card says: “Reject specific discount codes when the rules are met.”

When to use this template

Use this template for:
  • Blocking one or more discount codes for a matching cart.
  • Blocking a family of codes with a wildcard, such as every influencer code that starts with INF-.
  • Letting customers use only one code from a list (no stacking of several listed codes).
  • Showing customers a custom message when a code is rejected.
  • Preventing a code from being used by certain customers.
  • Rejecting codes when a cart contains specific products, collections, variants, purchase types, or destinations.
  • Rejecting codes based on cart subtotal, cart quantity, order weight, customer tags, past order count, login status, or customer email.
Use Custom Rule Builder instead when the merchant wants to create a discount, not reject discount codes.

Top-level controls

The form includes:
  • Use Custom Rule Builder shortcut.
  • Discount ID (For your reference) with placeholder eg: GET 20% OFF.
  • Select Discount Codes To Reject.
  • When To Reject Discount Codes.
  • Schedule.

Status mode

The top-right status dropdown controls who can use or see the discount.

Select discount codes to reject

The Select Discount Codes To Reject section controls which codes AIOD should reject and how the rejection behaves. Controls:
  • Add Code text input with placeholder Enter discount code, e.g. SAVE10 or INF-*.
  • Add Code button.
  • Allow only one of these codes checkbox.
  • Message shown to customers text field.
The Add Code button was disabled in the observed empty state. Enter a code first, then add it to the rejection list.

Code matching and wildcards

AIOD’s helper text: “Codes match regardless of case. Use * to match any characters: INF-* covers INF-ALICE, INF-BOB and so on.”
  • A code without * must match exactly, ignoring case.
  • * matches any characters, including none, and can appear anywhere in the code.
  • Spaces before or after a listed code are ignored.
  • AIOD rejects only codes that Shopify allows a discount function to reject. A code Shopify marks as not rejectable stays applied.

Allow only one of these codes

AIOD’s helper text: “Keep the code the customer entered last and reject the others. Without this, every matching code is rejected.” If Shopify marks one of the matching codes as not rejectable (for example, its discount is already applied), that code is the one kept, and every other matching code is rejected. Use this to stop customers from stacking several codes from the same list, for example when only one influencer code should apply per order. The rule’s When To Reject Discount Codes condition must still be met.

Message shown to customers

Message shown to customers sets the text customers see at checkout when a code is rejected.
  • Placeholder: This code isn't applicable with your cart.
  • Helper text: “Shown at checkout when a code is rejected. is replaced with the rejected codes. Leave empty to use the default.”
  • Maximum length: 255 characters.
  • Leave it empty to show the default message, This code isn't applicable with your cart.
Example: {codes} can't be combined with your bundle price. shows as INF-ALICE can't be combined with your bundle price. When several codes are rejected, {codes} lists them separated by commas, such as INF-ALICE, INF-BOB. The message is shown in the language the merchant writes it in. It is not translated per customer language.

When to reject discount codes

The When To Reject Discount Codes section controls when AIOD rejects the selected codes. The default is Always. Click the condition button to choose a trigger. The condition picker is the same style used by Custom Rule Builder.

Schedule

The Schedule section (renamed from Active Dates) controls when the rejection rule starts and ends. Options:
  • Run continuously — selected by default. The rule has no start or end date.
  • Set a schedule — reveals start and end date or time fields.

Save

Click Save after adding the discount codes to reject, choosing Allow only one of these codes and the Message shown to customers if needed, choosing the rejection condition, and setting the schedule. The form shows Rule Size and a Shopify limit note. In the observed form, the rule size was shown against a 10 KB Shopify limit.