Glumes ITSalesforce Ecosystem Experts
Back to Blog
Commerce Cloud

Launching B2B Storefronts on Commerce Cloud

Glumes TeamAugust 14, 202510 min read

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/productDetails
  • commerce/productList
  • commerce/cart
  • commerce/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 Product2 and ProductCategory
  • Synonym rules per store
  • Boosts by buyer segment, recency, contract price availability
  • typedown autocomplete 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

  1. Pilot with 1 buyer group, 100 SKUs
  2. Add reorder + saved lists
  3. Add contract pricing + approval
  4. Integrate to ERP
  5. Add punch-out for enterprise procurement clients
Commerce CloudB2BeCommerce