> For the complete documentation index, see [llms.txt](https://docs-shpf.bsscommerce.com/b2b-wholesale-solution/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-shpf.bsscommerce.com/b2b-wholesale-solution/other-b2b-modules/discount-code/set-discount-codes-on-your-orders.md).

# Set Discount Codes on Your Orders

The **Discount Codes** module lets your B2B customers **enter a discount code in a Discount Code box on your cart page**, just like on a regular Shopify store. You keep full control over which customers and products can use each code.

{% hint style="info" %}
Customers enter these codes in the **Discount Code box on the cart page**, not in the discount field at Shopify checkout. Codes created in Shopify admin are separate. To accept those at a B2B checkout, enable **Shopify discount** in **Settings › Shopify checkout settings**.
{% endhint %}

{% hint style="warning" %}
The module is hidden on storefront v4 stores. For general admin navigation, see [Navigate the app](/b2b-wholesale-solution/getting-started/navigate-the-app.md).
{% endhint %}

## Step 1: Open Discount Codes and turn it on

1. In your **Shopify admin**, open **Apps › BSS B2B Solution**.
2. Go to **B2B orders & discounts** and open the **Discount Codes** tab.
3. Turn on the switch next to the **Discount Codes** title. While it is off, your codes are saved but customers don't see them.

<figure><img src="https://1478990334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGolQYRPH9iUGYatlTXwl%2Fuploads%2Fgit-blob-60bf27ffe2c9eec4dd2e9b1d2ae49bc447a2987a%2Fcms-dc-setup-01.png?alt=media" alt="Discount Codes rule list"><figcaption><p>Discount Codes rule list</p></figcaption></figure>

The module header shows **Settings** and **Storefront setup** as buttons. **Translations** and **Usage history** are under **More actions**.

## Step 2: Create a discount code

Click **Add rule** (or **Create discount code** if you have no codes yet). The form is a single page of cards. Fill in the cards below, then click **Save**.

{% hint style="success" %}
Need many codes at once? Click **Quick create** next to **Add rule**. Each row becomes one discount code. Type the code, pick the **Discount** and **Value type**, and enter the **Value**. You can also use **Generate empty codes** or **Paste codes** (one row per line: code, then the value; comma or tab separated). Quick-created codes apply to all customers and all products, with no minimum requirement and no usage limit. Open a code afterwards to narrow it.
{% endhint %}

<figure><img src="https://1478990334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGolQYRPH9iUGYatlTXwl%2Fuploads%2Fgit-blob-1d553989317e38588d83faad31b41e652dff8208%2Fcms-dc-create-01.png?alt=media" alt="Create discount code form"><figcaption><p>Create discount code form</p></figcaption></figure>

### Rule

| Field      | Options          | What it does                                                                                                                                |
| ---------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **Name**   | Text             | Name shown in your rule list. Fills in from your discount (for example "Order discount 10% with code B2BSPRING10") until you type your own. |
| **Status** | Enable / Disable | Disabled rules are not applied on your storefront. Keep **Enable** for a live code.                                                         |

### Discount code and Discount type

| Field                            | Options                                                                                                | What it does                                                                             |
| -------------------------------- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |
| **Discount code**                | Text, or **Generate code**                                                                             | The code customers type in the cart box. Must be unique in your store.                   |
| **Discount code case-sensitive** | Yes / No                                                                                               | Whether capital letters must match exactly.                                              |
| **Discount type**                | **Discount applied to eligible products**, **Discount applied to the entire order**, **Free shipping** | What the code discounts. Choosing the first option adds a **Products** card.             |
| **Discount value**               | **Percentage (%)** or **Fixed amount**, plus the value                                                 | How much the code takes off. Percentage goes up to 100. Not shown for **Free shipping**. |

### Customers

Choose who can use the code: **All** (logged-in and not-logged-in customers), **Logged-in customers**, **Not-logged-in customers**, **Specific customers** (search and select customers from your store) or **Customer tags**.

### Products

Shown only when **Discount type** is **Discount applied to eligible products**. Choose **All products**, **Specific products**, **Product collections** or **Product tags**.

### Minimum purchase requirement and Usage limits

| Field                                                            | Options                                                                                | What it does                                                                                                                   |
| ---------------------------------------------------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **Minimum purchase requirement**                                 | **No minimum requirement**, **Minimum purchase amount**, **Minimum quantity of items** | The cart must reach this value before the code works.                                                                          |
| **Limit number of times this discount can be used in total**     | Number                                                                                 | Stops the code after this many uses. Optional.                                                                                 |
| **Limit number of times this discount can be used per customer** | Number                                                                                 | Caps uses for each customer. Works when **Customers** is **Logged-in customers**, **Specific customers** or **Customer tags**. |
| **Display remaining codes on the cart page**                     | Checkbox                                                                               | Shows how many uses are left to the customer. Available once a usage limit is set.                                             |

### Exclusions, link and dates (optional)

This card is collapsed behind **Show**. It opens automatically if the code already has exclusions or a link.

| Field                 | What it does                                                                                                                                                                                                                                                                                  |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Exclude customers** | Exclude specific customers or customer tags from redeeming the code. Use it to keep buyers with negotiated custom pricing from stacking a coupon on top.                                                                                                                                      |
| **Shareable link**    | Generate a link that applies the code when a customer uses it and the conditions are met. Set a **Discount link landing page** where customers land afterwards. Create a dedicated page for the link, otherwise customers see the 404 page before being redirected. Each link must be unique. |
| **Start/End date**    | Set when the code starts and, optionally, stops working. Scheduled and expired codes show a **Scheduled** or **Expired** badge in the list.                                                                                                                                                   |

### Make Discount Codes live

The right-hand card **Make Discount Codes live** shows a **Not live yet** or **Live** badge with checks: **Rule saved**, **Rule is enabled**, **Discount Codes module is on**, **App embed is on in your theme** and **Discount code box in your theme** (click **Add app block** if the box is not on your cart page yet). After you save a new code, the card moves to the top of the page.

<figure><img src="https://1478990334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGolQYRPH9iUGYatlTXwl%2Fuploads%2Fgit-blob-26111fb274eae75872dc2b9edbadee638b596f8c%2Fcms-dc-create-02.png?alt=media" alt="Save the code and check the live status"><figcaption><p>Save the code and check the live status</p></figcaption></figure>

### Quick edit

To change a rule's **Rule name** or **Status** without opening it, click **Quick edit** in the rule's row actions. Select several rules and choose **Edit status** to turn them on or off together.

## Step 3: Add the Discount Code box to your cart page

1. Click **Storefront setup** at the top of Discount Codes.
2. Turn on the module and the app embed if they are not on yet.
3. Click **Add app block** in the **Discount code box in your theme** row, then save in the theme editor.

Customers can now enter the code in that box on the cart page.

<figure><img src="https://1478990334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGolQYRPH9iUGYatlTXwl%2Fuploads%2Fgit-blob-ff8a725baf7ba9b56ef577982b30e2db47e9a5e8%2Fcms-dc-storefront-01.png?alt=media" alt="Add the Discount Code box to the cart page"><figcaption><p>Add the Discount Code box to the cart page</p></figcaption></figure>

{% hint style="info" %}
The box shows only to shoppers who match at least one of your codes, so check each code's **Customers**, exclusions and **Start/End date**. To hide it from retail customers and guests, set **Customers** to **Logged-in customers** or **Customer tags**. If the block is missing in the theme editor, make sure the module switch is on. If it still does not appear, chat with us: our team sets it up on your theme for free.
{% endhint %}

## Step 4: Customize how the box looks and reads

* **Settings** (header button): change the design of the discount box (layout, style, input, border, size, button, header text and preview).
* **More actions › Translations**: change the texts customers see, per language.

## Step 5: Track code usage

* The **Used** column on the Discount Codes list shows how many times each code was used.
* **More actions › Usage history** lists each use with the discount, value, customer, order and time.
* Applied discounts also appear on the **Order confirmation** page and in **Order details** in your Shopify admin.

### 💡 Example

You create a code **B2BSPRING10**: **Discount applied to the entire order**, **Percentage (%)** of 10, **Minimum purchase amount** of $500, **Customers** set to **Customer tags** (wholesale). When a tagged customer's cart is over $500 and they enter the code, the discount applies before checkout.

***

## Check how Discount Code looks on your store:

* On the Cart page:

<figure><img src="https://1478990334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGolQYRPH9iUGYatlTXwl%2Fuploads%2Fgit-blob-98579f50999d52b22c7338707d6e18f63ae9a796%2Fcms-dc-storefront-02.png?alt=media" alt="B2B discount code box on the cart page"><figcaption><p>B2B discount code box on the cart page</p></figcaption></figure>

* On the Checkout page:

<figure><img src="https://1478990334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGolQYRPH9iUGYatlTXwl%2Fuploads%2Fgit-blob-d9c3fe050dded18ef818d3b20cf346cc4ba2d411%2Fcms-dc-storefront-03.png?alt=media" alt="The applied code at checkout"><figcaption><p>The applied code at checkout</p></figcaption></figure>

{% hint style="info" %}
Customers can't use a B2B code at Shopify checkout, and can't use it on Shopify POS. On POS, the B2B Price tile applies your Custom Pricing, Price Lists and Volume Pricing rules instead.
{% endhint %}

{% hint style="info" %}
If you need further assistance, please feel free to reach us at [**support@bss-b2b.solutions**](mailto:support@bss-b2b.solutions) or [**Live Chat**](https://go.crisp.chat/chat/embed/?website_id=9f64b5a9-1a02-4190-93b8-8ef56b19f740).
{% endhint %}
