B2B is not B2C with a login
Real B2B storefronts need:
- Buyer Accounts and Account Groups with hierarchy
- Contract Pricing (per Account, negotiated, effective-dated)
- Order-on-Behalf for reps and CS
- Approval workflows (spending limit, cost center)
- Bulk ordering (CSV upload, saved lists, reorder)
- Punch-out (SAP Ariba, Coupa) for procurement systems
Commerce Cloud on Core (LWR-based) ships primitives for all of these.
The store, technically
Metadata under force-app/main/default/experiences/MyStore/. Standard components:
commerce/productDetailscommerce/productListcommerce/cartcommerce/checkout
Extend with LWC — same SFDX pipeline as any other Experience Cloud site.
Pricing pipeline
Base Price Book (list price)
→ Buyer Group price book (segment tier)
→ Contract Price (Account-specific, effective-dated)
→ Promotion (auto-applied via QualifierRule)
→ Adjustments (loyalty, coupon)
→ Displayed Unit Price
Cart Total → Tax (Avalara / Vertex) → Shipping → Grand Total
Pricing procedures are Apex extensions of the Pricing service — cacheable, deterministic.
global class ContractPriceOverride implements commercepayments.PaymentGatewayAdapter {
// Or: implements sfdc_checkout.CartPriceCalculations
public sfdc_checkout.IntegrationStatus startCartProcessAsync(
sfdc_checkout.IntegrationInfo jobInfo, Id cartId) {
// load contract prices for buyer, apply
}
}
Reorder & saved lists
Model as WebCart templates + WebCartItem. Enable "Reorder" on any historical Order to clone into a new cart.
Search: Einstein Search Personalization
Product search runs on Einstein Search for Commerce:
- Indexed fields defined on
Product2andProductCategory - Synonym rules per store
- Boosts by buyer segment, recency, contract price availability
typedownautocomplete backed by the same index
Checkout flow
Checkout is a Flow — headless payment, tax, and shipping via extension points:
Checkout Flow: Standard
1. Verify Cart (Apex)
2. Calculate Tax (Avalara adapter)
3. Calculate Shipping (custom rate service)
4. Take Payment (Payment Gateway adapter)
5. Create Order + Post to ERP (MuleSoft)
Each step is replaceable. Never edit the base Flow — clone once, extend forever.
Performance targets
- LCP < 2.5s on category pages
- Product Detail: server-render + hydrate the "buy box" client-side
- 1M SKU catalog: partition by Buyer Group, precompute search index
Rollout pattern
- Pilot with 1 buyer group, 100 SKUs
- Add reorder + saved lists
- Add contract pricing + approval
- Integrate to ERP
- Add punch-out for enterprise procurement clients
Commerce CloudB2BeCommerce
