Use Composable Storefront in a Hybrid Implementation

A hybrid storefront allows the combination of traditional storefronts built on Salesforce Commerce Cloud with decoupled, headless Composable Storefront sites. B2C Commerce supports hybrid storefront implementations so that you can execute on your headless strategy with reduced cost and faster time to market.

Only existing customers can access some of the links on this page. Visit Salesforce Commerce Cloud GitHub Repositories and Access for information about how to get access to the Commerce Cloud repositories.

Salesforce's supported implementation for a hybrid storefront is part Storefront Reference Architecture (SFRA) and part Composable Storefront. Other headless solutions are not officially supported. Although SiteGenesis is not officially supported, there is a Site Genesis + Composable POC.

With B2C Commerce version 25.3, hybrid authentication (auth) replaces Plugin SLAS. Hybrid auth is a standalone solution for implementations that need both SFRA/SiteGenesis authorization and Shopper Login and API Access Service (SLAS) authorization. This means you need both a dwsid (SFRA/SiteGenesis) and a JSON Web Token (SLAS), and these tokens must be kept in sync. Hybrid auth is an improvement over the Plugin SLAS approach, offering enhanced performance and stability of hybrid storefronts by moving the feature directly into the B2C Commerce platform.

For more information about hybrid auth, see Configure a Hybrid Storefront with Hybrid Auth.

Decide on the goals, scope, and timeline for your hybrid (phased headless) rollout. Keep in mind that the longer your site is in hybrid mode, the more time you have to spend on the operating complexity involved. Set a due date for transitioning to a 100% Composable site.

A principal benefit of a single page application(SPA) like PWA Kit is that the app bundle is sent to the client and subsequent page requests can often be served without server requests. For this reason, we highly recommend having more than 1 page on PWA Kit to gain performance and shopper UX efficiencies, for example: instead of just your homepage - migrate your homepage and next 1-2 most common journey steps (homepage & search; homepage & our brand). Use the analytics tools at your disposal to chart these common customer journey paths through your site.

With B2C Commerce version 25.3, hybrid authentication.

replaces Plugin SLAS. Hybrid storefronts that use Plugin SLAS are still supported.

The following image provides an example hybrid B2C Commerce stack that uses plugin_SLAS. Composable Storefront, which contains PWA Kit and MRT, serves the top of funnel as a headless implementation and uses SCAPI to communicate with the B2C Commerce instance. An SFRA storefront running cart and checkout communicates directly with the B2C Commerce instance. The SFRA project uses plugin_SLAS to facilitate session data between the two infrastructures. A CDN (eCDN or your own stacked CDN) routes traffic to the two infrastructures depending on the shopper requested path. B2C Commerce Hybrid

The use of Plugin SLAS for hybrid deployments is formally supported when used with the PWA Kit.

  • Use of this cartridge to enable hybrid with bespoke or custom headless web applications is possible but not formally supported.
    • Customers may also consider using the B2C Commerce APIs directly to facilitate this use case.
  • Plugin SLAS is configured for hybrid PWA Kits against the latest version of SFRA.
    • SiteGenesis users can leverage an unofficial solution that extends Plugin SLAS and SiteGenesis to facilitate this use case. To learn more, see Proof of Concept for Plugin SLAS.