Prompt
How do I support B2B pricing in an ecommerce storefront?
Latest observation
To support B2B pricing in an ecommerce storefront, you usually need to go beyond a single public list price and introduce customer-specific pricing logic. The exact approach depends on your business model, but most B2B setups include some combination of the following:
Core pricing capabilities
-
Customer-specific price lists
- Different companies, accounts, or buyer groups see different prices.
- Example: Retail customers see standard pricing, while distributors get contracted pricing.
-
Contract pricing / negotiated pricing
- Prices are tied to a specific customer agreement.
- Often overrides all other discounts or catalog prices.
-
Tiered pricing by quantity
- Price changes based on order volume.
- Example: 1–9 units = $10, 10–49 = $8.50, 50+ = $7.25.
-
Customer group pricing
- Assign pricing rules to segments like wholesale, reseller, dealer, or VIP.
-
Multi-currency / regional pricing
- B2B buyers in different regions may need localized prices, taxes, and currencies.
-
Tax-excluded pricing
- B2B catalogs often show prices before tax, with tax calculated at checkout.
-
Quoting / request-for-price
- Some products may not have public prices and instead require a quote workflow.
Common implementation patterns
1. Store a base catalog price
Maintain a standard “list price” for each SKU.
2. Apply price resolution rules at runtime
When a user views a product, determine the final price using this order of precedence:
- Contract price for this account
- Customer-group price
- Quantity break price
- Promotional discount
- Base list price
This keeps pricing logic predictable.
3. Use account-based authentication
B2B pricing usually depends on who is logged in. You’ll need:
- customer login
- company/account association
- role or group assignment
- approval/credit terms if needed
4. Keep pricing data separate from product data
Don’t hardcode prices into product records if pricing varies by customer.
Instead, model pricing as a separate service or table, for example:
- product_id
- account_id / group_id
- min_qty
- currency
- start/end dates
- price
5. Support “price visibility” rules
Some stores let anonymous users browse products but:
- hide prices until login
- show “login for pricing”
- show estimated pricing only
Backend considerations
You’ll want to design for:
-
Price calculation service
Centralized logic for calculating final prices. -
Caching
B2B price lookups can be expensive. Cache per account/product if prices don’t change often. -
Auditability
Store price sources and rule outcomes for troubleshooting:- “Price came from contract agreement X”
- “Quantity tier applied”
- “Promotional discount applied”
-
ERP/PIM/CRM integration
Often pricing is mastered in ERP or CPQ systems, not directly in the storefront. -
API support Your storefront API should return:
- unit price
- list price
- discount breakdown
- currency
- applicable quantity tiers
- whether price is negotiable or hidden
UX best practices
For B2B buyers, it helps to display:
- unit price and extended price
- price breaks by quantity
- “your price” vs list price
- net terms / invoice payment options
- downloadable quotes/orders
- reorder shortcuts
If prices are hidden:
- make login friction low
- clearly explain why pricing is unavailable
- provide a fast quote request path
If you’re building this from scratch
A good minimal architecture is:
- Product service: SKU, description, base price
- Customer/account service: company, groups, contracts
- Pricing engine: rules and precedence
- Storefront API: returns computed price for current user
- Admin tools: manage price lists, tiers, and contracts
Questions to clarify your setup
To recommend the best implementation, it helps to know:
- Are prices customer-specific or group-based?
- Do you need quantity breaks?
- Are you integrating with ERP/CPQ?
- Do you show prices to anonymous users?
- Is tax included or excluded?
If you want, I can also give you:
- a data model for B2B pricing,
- a pricing precedence algorithm, or
- an example for a specific platform like Shopify, Magento, BigCommerce, or a custom storefront.