Integration Architecture for B2B and D2C Stores (LWR)
A predefined set of flows simplifies package integration for tax, shipping, and payment providers for B2B and D2C stores created with an LWR template. The integrations are embedded into the cart and checkout experience, triggered by shopper interactions with the storefront UI.
In the Winter ‘24 release, we introduced Commerce extensions for pricing, inventory, shipping, taxes, and other services. While the checkout integrations framework is still supported, we recommend extensions over integrations because they offer more targeted customizations for your B2B or B2C store. Plus, they’re available for more Commerce domains. See Get Started With Salesforce Commerce Extensions.
B2B and B2C stores created with an LWR template support these third-party integration points and flows.
- Shipping—Calculates and writes shipping costs per delivery group.
- Taxes—Calculates and adds tax prices for cart items.
- Payment—Uses the Salesforce Payment Adapter framework to fetch tokens and authorizations (and manage exceptions, such as fraud and insufficient credit) from service providers during checkout via a Payments Gateway. The integrated Salesforce Order Management module handles additional services, including capture and refund.
Here’s how the various components work together to form the integration engine.
A predefined set of flows manages shipping, inventory, pricing, and tax integrations.
- Cart and checkout processing—Entering a delivery address initiates shipping charges and tax calculation. Order placement triggers payment processing. An integrated Salesforce Order Management component processes refund, capture, and more.
- Connect REST API—Service for these discrete APIs. Shipping, tax, and payment integrations execute tasks asynchronously and are distinct from the Salesforce B2B Checkout subflows implementation for a store built with the Aura template.
- Task handler—The task handler is implemented as an MQ (Message Queue) handler and invoked by the queue manager when the integration task is picked up for processing. The integration handler is responsible for delegating the task to the integration implementation, which the Commerce Admin or Merchandiser specifies when setting up the store.
- Handler factory—Responsible for creating an integration handler that maps to the implementation chosen by the Commerce Admin during store setup.
- Integration services—Using the store’s configured named credentials, a gateway conveys requests for third-party tax and shipping calculations. The CCS (Core Commerce Services) Adapter and Service Salesforce Payment Adapter request and receive authorizations, tokens, and exceptions from a third-party service via a Payments Gateway.
- API responses—Successful results and exceptions with customer-facing help messages are returned to the shopper’s browser.