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:

standard-35
CategoryStandard category
Discount35% OFF
premium-25
CategoryPremium category
Discount25% OFF
elite-20
CategoryElite category
Discount20% OFF
special-40
CategorySpecial category
Discount40% OFF

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.

B2B Standard 35
ConditionTag contains standard-35
B2B Premium 25
ConditionTag contains premium-25
B2B Elite 20
ConditionTag contains elite-20
B2B Special 40
ConditionTag contains special-40

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

B2B Standard Products
ContentsStandard category B2B products
B2B Premium Products
ContentsPremium category B2B products
B2B Elite Products
ContentsElite category B2B products

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

Code name
Valuestandard-35
Type
ValuePercentage discount
Rate
Value35%
Applies to
ValueB2B Standard Products collection
Eligible customers
ValueB2B Standard 35 segment

Create Coupons for Other Tags Similarly

standard-35
Discount35%
Target CollectionB2B Standard
Target SegmentB2B Standard 35
premium-25
Discount25%
Target CollectionB2B Premium
Target SegmentB2B Premium 25
elite-20
Discount20%
Target CollectionB2B Elite
Target SegmentB2B Elite 20
special-40
Discount40%
Target CollectionB2B Special
Target SegmentB2B Special 40

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.

Related Topics