Key takeaways
  • Model variants, price books and fulfilment rules before building screens.
  • Reserve stock explicitly and release it on timeout or failure.
  • Every payment and inventory event needs an idempotency and reconciliation story.

The catalogue is a domain model

A product is not a row with a price. It is a set of variants, media, entitlements, tax classes, channel availability and customer-specific price rules. B2B commerce adds quote-to-order, approval thresholds and contract pricing. We model these relationships before storefront work, because retrofitting price books into a single price column is how discount drift begins.

The storefront consumes versioned APIs and caches aggressively at the edge. Cache keys include channel, currency, customer segment and locale. Personalised prices are never placed in a shared cache. Search indexing is treated as a derived read model with an explicit rebuild path.

  • Variant, entitlement and price-book modelling
  • Channel and customer-segment cache keys
  • Versioned storefront APIs
  • Rebuildable search and catalogue read models

Make order placement idempotent

Checkout begins with a reservation, not a hope. The order command validates price and availability, reserves inventory with an expiry, creates a payment intent and records an idempotency key. If the browser retries, the same command returns the same result. If payment succeeds but the response is lost, the webhook reconciles the order rather than creating a duplicate.

Inventory release is equally important. Unpaid reservations expire, failed payments release stock and cancellations reverse the correct ledger entries. We use an outbox or event stream so ERP, WMS and support tools receive consistent state without synchronous coupling.

  • Reserve-then-confirm stock policy
  • Idempotency keys on order and payment commands
  • Webhook verification with retry and replay
  • Outbox events for ERP and fulfilment

Engineer for peak and failure

Performance budgets cover Core Web Vitals, search latency and checkout step completion. Load tests model realistic browse-to-buy ratios, not just homepage traffic. Payment provider timeouts, partial outages and duplicate callbacks are exercised before a seasonal event.

Operational visibility is part of the product: order funnel, payment failure reasons, reservation expiry, inventory reconciliation exceptions and fulfilment lag. A storefront that looks calm while support is manually fixing oversells is not ready for scale.

  • Core Web Vitals and checkout budgets
  • Scenario-based peak load tests
  • Payment failure and callback rehearsal
  • Business-level monitoring and exception queues

Questions we hear in the room

Should we replatform?

Only if the current platform blocks the next stage of growth. We assess operational pain, release velocity, total cost and migration risk before recommending a rebuild.

Can B2B and D2C share inventory?

Yes, with separate catalogues and price rules backed by a single inventory truth and explicit reservation policy.

Related capabilityMobility & Field Applications Industry contextManufacturing & Industrial