Shopify B2B Discount Configuration

Step-by-step guide for customer tags, segments, collections, and coupons

ShopifyCustomer TagsCouponsCustomer SegmentsB2B Setup
4 min read

Required Shopify Configuration

To run the B2B auto-discount system, configure these four elements in Shopify admin:

  1. Customer Tags - Identifiers for B2B customers
  2. Customer Segments - Group customers by tags
  3. Collections - Organize B2B-eligible products
  4. Coupons (Discount Codes) - Handle actual discounting

Let's look at each in detail.

Step 1: Tag Customers

Assign tags to B2B accounts following specific rules.

Tag Naming Convention

category-code-discount-rate

Examples:

Why This Naming Convention?

Embedding the discount rate in the tag name lets the frontend extract the rate just by reading the tag.

Get tag "standard-35"
    ↓
Extract "35" as number
    ↓
Calculate as 35% OFF

As we'll see later, this tag name also becomes the coupon name.

Multiple Tags

You can assign multiple tags to one customer.

Example: A dealer handling multiple categories

  • standard-35 (Standard 35% OFF)
  • premium-25 (Premium 25% OFF)

When this customer adds products from both categories to cart, each gets the appropriate discount.

How to Tag in Shopify

  1. AdminCustomers → Select target customer
  2. Enter tag following the above rules in Tags field
  3. Save

For bulk tagging, use CSV import or Admin API automation.

Step 2: Create Customer Segments

Customer segments group customers meeting specific conditions. This enables coupons that apply "only to people with this tag."

Creating Segments

  1. AdminCustomersSegments
  2. Click "Create segment"
  3. Set conditions

Condition Example

Customer tags contains standard-35

Saving with this condition creates a segment containing only customers with the standard-35 tag.

Create Segments for Each Tag

Create a segment for each tag.

Step 3: Create Product Collections

Organize products eligible for B2B discounts into collections.

Creating Collections

  1. AdminProductsCollections
  2. Click "Create collection"
  3. Enter collection name (e.g., B2B Standard Products)
  4. Add products manually or automatically

Using Automated Collections

You can set conditions to automatically add products.

Examples:

  • Auto-add products with type "Standard"
  • Auto-add products from specific vendors (brands)

Collection Design Example

Step 4: Create Coupons (Discount Codes)

Now for the core part. Create coupons with names exactly matching the tags.

Coupon Creation Steps

  1. AdminDiscounts → "Create discount"
  2. Select Discount code
  3. Configure the following settings

Key Settings

Code Name:

standard-35

(Must exactly match the tag name)

Discount Type:

  • Percentage

Discount Value:

35%

(Must match the number in the tag name)

Applies To:

  • Specific collections → Select B2B Standard Products

Customer Eligibility:

  • Specific customer segments → Select B2B Standard 35

Usage Limits:

  • Number of uses per customer: Unlimited (or as desired)

Settings Summary Table

Create Coupons for Other Tags Similarly

Configuration Verification

Checklist

  • [ ] Customer tags assigned correctly
  • [ ] Segments include eligible customers
  • [ ] Collections contain target products
  • [ ] Coupon names exactly match tag names
  • [ ] Coupon customer eligibility set to segment
  • [ ] Coupon product eligibility set to collection

Common Mistakes

  1. Tag/coupon name mismatch

    • standard-35 and Standard-35 are treated differently
    • Watch for case sensitivity and spaces
  2. Segment condition errors

    • Choosing "equals" instead of "contains"
    • Incorrect AND/OR for multiple conditions
  3. Missing coupon target settings

    • Forgetting segment restriction makes it available to everyone

Adding New B2B Accounts

Once this setup is complete, adding new B2B accounts is simple:

  1. Tag the customer (e.g., standard-35)
  2. Done!

Just adding the tag:

  • Automatically adds them to the segment
  • Makes that segment's coupon applicable
  • Displays member pricing on the headless side

Next Steps

With Shopify configuration complete, next is the headless (Next.js) implementation. We'll look at the logic for reading tags, calculating prices, and auto-applying coupons.