Salesforce Decode
Salesforcedecode
Back to questions
Headless 360Architect (Hardest)commerce-apiheadlessb2carchitecture

Design headless commerce architecture with Salesforce B2C Commerce APIs

Real World Scenario

A fashion brand replatforms to React Native mobile and Next.js web while keeping Salesforce B2C Commerce as cart and order system of record.

Expected Answer

• Use Shopper APIs for session, basket, product search, and checkout with SLAS authentication • Separate presentation layer concerns—CMS for content, Commerce for transactional APIs • Implement API gateway caching product catalog with cache invalidation on price/inventory changes • Design idempotent order submission handling network retries on mobile • OAuth and guest vs registered shopper token lifecycle management • Webhook or event-driven order status updates to mobile push notifications • Observability: trace ID across client, CDN, and Commerce API calls for latency debugging

Follow-Up Questions & Answers

Click to expand — each follow-up includes a direct, interview-ready answer

Main difference: use case and scale. Use Shopper APIs for session, basket, product search, and checkout with SLAS authentication. Separate presentation layer concerns—CMS for content, Commerce for transactional APIs. Pick based on your integration pattern and team capability. Headless commerce succeeds when API contracts are stable and cached reads are separated from transactional writes—treat SCAPI as your transactional boundary. Document the decision in an ADR and align with enterprise standards.

Architect Perspective

Headless commerce succeeds when API contracts are stable and cached reads are separated from transactional writes—treat SCAPI as your transactional boundary.