Skip to content

Set Discount Codes on Your Orders

The Discount Code feature lets your customers enter B2B discount codes in the cart, while you control which customers and products each code works for, how often it can be used, and when it is active.

Use it to run promotions, reward loyal buyers, or offer special deals to selected wholesale customers.

  1. Enable the Feature and Add the Code Box to Your Cart

    Section titled “Enable the Feature and Add the Code Box to Your Cart”
    1. In the app, go to B2B orders & discounts > Discount Codes and toggle the module on.
    2. Click Storefront setup and add the BSS Discount Code app block to the cart page. If your theme needs it, the page also shows how to add the Discount Code file to your theme by hand.
    3. Customers now see a Discount Code box on the cart.

    Storefront setup with module, app embed and code box all done

  2. On the Discount Codes page, click Add rule (Create discount code on an empty list).

    Discount Codes page with one rule in the list

    The rule page groups the settings into cards:

    Rule: rule name (internal only) and status.

    Rule card with the name and status Enable

    Customers and Products

    • Customers: All, Logged-in customers, Not-logged-in customers, Specific customers (search and select them) or Customer tags.
    • Products: All products, Specific products, Product collections or Product tags.

    Customers and Products cards of the rule

    Discount code and Discount type

    Discount code and Discount type cards for a 10% code

    Setting Options
    Discount code Type a code or click Generate code
    Discount type Discount applied to eligible products (each matching line), Discount applied to the entire order, or Free shipping
    Discount value Percentage (%) (0 to 100) or Fixed amount
    Discount code case-sensitive No (default): SAVE20 also works as save20. Yes: the code must match exactly
    Minimum purchase requirement No minimum requirement, Minimum purchase amount or Minimum quantity of items

    Order discounts and free shipping ignore the product selection and count the whole cart. The minimum amount is checked on the B2B prices (after Custom Pricing and Volume Pricing).

    Minimum purchase requirement and Usage limits cards

    Usage limits (optional)

    • Limit number of times this discount can be used in total.
    • Limit number of times this discount can be used per customer. Not available for not-logged-in customers, because guests cannot be counted.
    • Display remaining code on Cart page, for example “5 discount codes remaining”.

    The next three sections, Dates (optional), Share link (optional) and Exclusions (optional), are closed by default. Click Show to open one. When you open a saved rule, Dates opens on its own if the rule has an end date or a start date in the future. Share link opens if the share link is on. Exclusions opens if the rule has an exclusion.

    Dates (optional)

    • Set a Start date and Start time, and optionally tick Set end date to add an End date and End time.

    Share link (optional)

    • Generate a shareable link for this discount: customers who open the link have the code applied automatically (if they meet the conditions) and are redirected to the page you choose, the cart by default. Tip: create a dedicated page for the link; otherwise customers briefly see a 404 page before they are redirected.

    Exclusions (optional)

    • Exclude customers by tag or by specific customers, for example buyers who already have negotiated prices. Exclusion wins over the targeting above.

    Dates, Share link and Exclusions cards opened

    Click Save to publish the rule.

    • Customers enter the code in the Discount Code box and click Apply.
    • The app checks the code and the cart right away and shows the discounted total.
    • If the code cannot be used, the box explains why, for example a minimum that is not reached (with the missing amount) or “Discount code is no longer available” when the total limit is used up.

    Discount Code box showing a minimum purchase message

    When the cart meets the conditions, the box confirms the code and the cart shows the new prices:

    Discount Code box after WHOLESALE10 was applied

    Cart with original prices struck through and discounted prices

    The discount is then carried to checkout, and you see it on the order in Shopify admin.

  3. Open More actions > Usage history on the Discount Codes page to see which customers used which code and when.

    More actions menu with Translations and Usage history

    Usage history page with the empty state

In Discount Code > Settings you can style the box. The settings are grouped as Layout, Field design, Button and Header text, with a live preview.

Discount Code settings with Layout, Field design, live preview

To translate its texts, such as the “Discount Code” header, the Apply button and the success and error messages, open More actions > Translations and add a language.

Translations page with the Add language button

Create the code B2BSPRING10: Discount applied to the entire order, Percentage (%) 10, Minimum purchase amount 500, for customers tagged wholesale. A tagged customer with a $600 cart enters the code and gets 10% off; with a $400 cart, the box shows how much more they need to add.