Skip to main content

Explore B2B and B2B2C Commerce

Learning Objectives

After completing this unit, you’ll be able to:

  • Describe how B2B and D2C Commerce run within the Salesforce platform.
  • List the tools and services available to help you build a B2B and D2C Commerce experience.
  • Describe the benefits of using Experience Cloud for store creation.
  • Explain the importance of using the content management system (CMS) for B2B and D2C Commerce graphics.

Meet Ursa Major Solar

Ursa Major Solar is a Southwest-based supplier of solar components and systems. It’s a small company with around 200 employees, and growing fast. Ursa Major Solar is committed to developing solar power systems that derive clean, pure energy and wants to use B2B Commerce and D2C Commerce for its online commerce business.

Many of Ursa Major’s customers, third-party suppliers, and installers are equally passionate about the environment. More than a few of them, like Ray (he/him) at Ray Solar Solutions, have been asking Sita Nagappan-Alvarez (she/her), Ursa Major Solar’s CEO, to consider developing products for the direct-to-consumer market. Ray wants to be the first to buy. He even volunteered to help with consumer solar product testing.

Sita Nagappan-Alvarez, Ursa Major Solar CEO

Ursa Major Solar has a healthy B2B business. Sita views direct ecommerce as a next step in her company’s evolution. In addition to gathering information about who uses her products (first-party data), she also wants to understand why and how they use her products. This will help as she plans for her future product mix, supply chain strategy, and so on. She's excited to start a new revenue stream. Sita’s integration partner tells her about B2B and D2C Commerce, which together handle both B2B and B2C. 

Her COO and co-founder, Roberto Alvarez (he/him), is typically cautious with IT expenditures. So he’s glad to know that B2B and D2C Commerce are built natively on top of the Salesforce Platform, providing a single system of record for orders. 

Roberto Alvarez, Ursa Major Solar COO

The company already uses Sales Cloud, Experience Cloud, and Service Cloud. Most of these Salesforce apps use Lightning Experience.

Sita asks her team to take a deeper dive into the B2B and D2C Commerce products.

The Ursa Major Solar team considers B2B and D2C Commerce

Her investigation team is made up of three key roles: the admin, the merchandiser, and the developer. Other employees will be involved in the implementation, including buyer managers, buyers, support agents, and marketing managers, to name a few. They will also rely on an experienced commerce solutions architect who works for a third-party provider. More about these roles later. 

What Are B2B and D2C Commerce?

Sita’s star investigation team learns that B2B and D2C Commerce are built natively on the Salesforce Platform with these incredible benefits.

  • Fast time to market: Use the product catalogs and business data you set up for your B2B and D2C Commerce stores, saving lots of time.
  • Intelligent experiences: Create personalized shopping experiences with drag-and-drop Einstein Recommendations and Search.
  • Trusted platform: Grow with a single global Salesforce platform.
  • Partner ecosystem: Explore a rich ecosystem of AppExchange integrations and systems integration partners to accelerate business.

The team gets these tools and services to help them build an amazing B2B and D2C Commerce experience.

  • Commerce management app: Use a single app to create, set up, and maintain both of your B2B and D2C stores.
  • Commerce components: Use base components, encapsulating data access and business logic, for tailored B2B and D2C experiences.
  • Core commerce services: Manage end-to-end commerce transactions with shared services such as search, recommendations, and inventory.
  • Shared data model: Use the same canonical entities (such as products, price books, and promotions) in B2B and D2C Commerce applications, and other core products.

The Salesforce Ecosystem

While you can configure both B2B and D2C Commerce in an org, and they can share data, they don’t have the same underlying framework. That means you can’t use them in the same app. The team takes a look at how they differ.

D2C Commerce

D2C Commerce uses Lightning Web Components (LWC), Experience Cloud, and a content management system (CMS). D2C Commerce runs on the Lightning Web Stack, which takes care of web runtime, data service, and the web and base components. How convenient! That means developers can access the same declarative, extensible data model, and AppExchange for partner apps.

The Salesforce Design System runs on top of the Lightning components, security, data service and web routines

A predefined set of flows simplifies package integration for D2C Commerce tax, shipping, and payment providers. These third-party integrations are embedded into the cart and checkout experience, triggered by shopper interactions with the storefront UI.

Here’s how the various components work together to form the integration engine for D2C Commerce.

Components working together to form the integration engine for D2C Commerce.

  1. Cart and checkout process (1): Entering a delivery address initiates shipping charges and tax calculation. Order placement triggers payment processing.
  2. Connect REST APIs (2): Service for discrete APIs. Shipping, tax, and payment integrations execute tasks asynchronously and are distinct from the Salesforce B2B checkout subflows implementation.
  3. Task handler (3): Implemented as an MQ (message queue) handler and invoked by the queue manager when the integration task is picked up for processing.
  4. Handler factory (4): Creates an integration handler that maps to the implementation chosen by the commerce admin during store setup.
  5. Integration services (5): Using the store’s configured named credentials, a gateway conveys requests for third-party tax and shipping calculations.
  6. API responses (6): Successful results and exceptions with customer-facing help messages are returned to the shopper’s browser.

See D2C Integration Architecture.

B2B Commerce

B2B Commerce is a modern, fast, and intelligent user interface. It lets you create a user experience that improves workflow and productivity, makes jobs easier and more intuitive, and even transforms your business. It provides:

  • Pages in Salesforce that are optimized for sales and service use.
  • New features that help your sales and service teams focus on the right deals, the right customers, and the right activities every time users log in.
  • Flexible, interactive tools that help everyone visualize data and take care of business.

Most B2B Commerce customers already use Salesforce apps such as Sales Cloud, Experience Cloud, and Service Cloud. Most of these apps use Lightning Experience.

B2B Commerce has the following features.

Feature

Description

Lightning Commerce Template

Easily set up and deploy commerce storefronts.

Lightning Internal Storefront Administrator UI

Manage and support commerce storefronts.

Digital Experience Platform

Create personalized shopping experiences.

  • Audience targeting
  • Personalization
  • Theming and branding
  • Lightning component and modern development framework

Unlike D2C Commerce, however, B2B Commerce is built on Apex, and does not use Lightning Web Runtime (LWR). This diagram illustrates how the B2B Commerce components work together to form the integration engine.

B2B Commerce components working together to form the integration engine

  • Checkout flow (1): A managed checkout flow processes cart shipping, inventory, pricing, and taxation integrations, and converts the cart to an order. Install and deploy the B2B checkout flow, then customize the flow in Experience Builder and optionally Flow Builder.
  • Cart processing (1): A predefined set of steps processes cart shipping, inventory, pricing, and tax integrations. Cart processing is executed on select cart actions.
  • Async Cart API (1): A cart service accepts the processing requests for shipping, inventory, price, and tax integrations. This service executes tasks asynchronously and returns a jobId to the caller.
  • Queue manager (2): The Async Cart API offloads execution of cart integrations by placing a task on the message queue (MQ). The queue manager is responsible for scheduling the future task execution, which provides the cart service a thread pool for potentially longer running async tasks.
  • Task handler (3): The task handler is implemented as an MQ handler and invoked by the queue manager when the integration task is picked up for processing. The integration handler is responsible for delegating the integration task to the integration implementation, which the store admin specifies when setting up the store.
  • Handler factory (4): Creates an integration handler that maps to the implementation chosen by the store admin when setting up the store.
  • Integration handler (5): Adapts the Java processing to Apex, managing the lifecycle and customer code error handling.
  • B2B buyer experience integration points: A set of Apex APIs that correspond to the B2B Commerce integration points for payment, shipping, and tax.

See B2B Commerce Integration Architecture.

Experience Cloud

B2B and D2C Commerce come with the Commerce app, which is built on top of the Salesforce platform. You can select it from the App Launcher.

Developers can use Experience Builder to create a store. Merchandisers and front-end builders can use Experience Builder to:

  • Choose a template for the storefront page format.
  • Change the theme and branding.
  • Create and configure pages.
  • Customize with components.
  • Add and configure custom components.

You get a collection of pages in a typical store. Each page has:

  • Theme layouts that you can brand and style.
  • A set of components that you can customize.
  • The ability to add custom components.

Content Management System (CMS)

You can use Salesforce CMS to manage the content from draft stage to publish and archive. Salesforce CMS, an app in Lightning Experience, is a unified shared service for all of Salesforce. Content created for B2B Commerce can also be used in D2C Commerce and vice versa. For example, the product images that show up on the product detail page reside in CMS, so it's easy to share them across multiple storefronts.

Next Steps

You learned about B2B and D2C Commerce features with the Salesforce platform. Next, learn about the personas and permissions required for a B2B and D2C Commerce implementation.

Resources 

Salesforce 도움말에서 Trailhead 피드백을 공유하세요.

Trailhead에 관한 여러분의 의견에 귀 기울이겠습니다. 이제 Salesforce 도움말 사이트에서 언제든지 새로운 피드백 양식을 작성할 수 있습니다.

자세히 알아보기 의견 공유하기