The Need for B2B Account Discounts
In typical online stores, all customers purchase at the same price. However, B2B (business/dealer) customers often require special treatment:
- Volume-based discount pricing
- Different discount rates by brand or product category
- Invoice payment (net terms) instead of credit card
This article introduces a system that automates all of these in a Shopify + Headless e-commerce setup.
What We Want to Achieve
Customer Experience
- Log in with a B2B account
- Member pricing automatically displayed on product pages
- Discounts auto-applied when adding to cart
- No coupon code entry required at checkout (applied behind the scenes)
- Option to choose invoice payment if desired
Operations Benefits
- Easy to add new B2B accounts
- Discount rate changes completed in Shopify admin only
- Flexible operations without code changes
System Overview
Let's look at the overall architecture.
①Tag customers (standard-35 etc.) ②Create segments ③Create collections ④Create coupons
⑤Fetch tags on login ⑥Display member pricing ⑦Auto-apply coupons ⑧Invoice payment support
Key Design: Tag Name = Coupon Name
The biggest point of this system is matching customer tag names with coupon names.
Tag Naming Convention
Embed the discount rate in the tag name.
| Tag Name | Meaning |
|---|---|
| standard-35 | Standard category 35% OFF |
| premium-25 | Premium category 25% OFF |
| special-40 | Special category 40% OFF |
Coupon Naming Convention
Create coupons with exactly the same name as the tags.
| Coupon Name | Discount | Target |
|---|---|---|
| standard-35 | 35% | Standard category products |
| premium-25 | 25% | Premium category products |
| special-40 | 40% | Special category products |
Why This Design?
This approach provides:
- No code changes: Adding new coupons doesn't require frontend code changes
- Easy operations: Add new B2B customers through Shopify admin only
- Simple rate changes: Just update both tag and coupon
Headless-Specific Challenges
Why Custom Implementation Was Needed
With traditional Shopify themes, you can easily add B2B functionality through apps. However, in headless setups, the frontend exists outside Shopify (e.g., Next.js), so app features can't be used directly.
What About Shopify B2B?
Shopify has official B2B features, but they require Shopify Plus (~$2,000/month). For small to medium e-commerce sites, this cost is a significant burden.
This design achieves B2B functionality on standard Shopify plans.
What This System Enables
1. Automatic Discounts
From the moment a customer logs in, member pricing is automatically reflected. No coupon code entry required.
2. Multi-Brand/Category Support
Even with different category products mixed in the cart, appropriate discounts are auto-applied to each.
Example:
- Standard category product → 35% OFF
- Premium category product → 25% OFF
- Both in cart → each correctly discounted
3. Invoice Payment (Net Terms)
Accept orders with invoice payment instead of credit cards. Uses draft orders to support post-payment invoice flow.
4. Flexible Priority Management
When multiple discount rules could apply to the same product, control with priority settings.
Next Steps
Implementing this system requires setup on both Shopify and headless sides.
The next article details the Shopify admin configuration.