Skip to main content

Get to Know the Guided Shopping Agent for B2C Storefronts

Learning Objectives

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

  • Describe how the Guided Shopping Agent for B2C Storefronts helps customers through their shopping journey.
  • List the licensing and access requirements.
  • Describe how to set up access to SCAPI.
Note

New Agent Building Experience Coming Soon!

Agentforce is getting an update! At Dreamforce 2025, we announced the new agent building experience which may differ from the process and features you learn about in this badge. Expect the new experience to become available in open beta in the weeks following Dreamforce. General availability comes soon after. The current builder experience remains available to support previously built agents. Stay tuned for more information.

Personalized Shopping Assistance Online

Shopping used to be a personal experience, with knowledgeable associates ready to assist. Today, much of it happens online. Yet many ecommerce experiences fail to capitalize on the crucial moment when a shopper's full attention is engaged—typically during product searches or customer service interactions.

Imagine Joythi, who’s searching online for a high-performance, eco-friendly laptop for her daughter’s birthday. She navigates numerous online stores, and is bombarded by endless options, promotions, and reviews. This information overload leads to decision fatigue, and she eventually gives up without buying anything. Joythi’s experience is common; many online shoppers abandon product searches, ready-to-convert carts, and customer service calls due to a lack of adequate support.

Now imagine Joythi searching for that same laptop but with an intelligent agent instantly available to provide a guided shopping experience. This agent helps Joythi find the perfect laptop, suggests compatible peripherals, and points out applicable promotions. Thanks to the agent, Joythi completes her purchase with confidence and assurance that she found just what she wanted.

With the Guided Shopping Agent for B2C Storefronts, you can offer customers like Joythi the very same experience. Powered by Agentforce, the autonomous AI agent offers shoppers timely assistance and ensures connected interactions throughout their customer journey on your B2C Storefront. The Guided Shopping Agent uses the Salesforce Commerce API (SCAPI) to retrieve product information from your B2C Commerce store. In addition, the agent combines natural language processing (NLP) with Data Cloud and your B2C Commerce data to provide a personalized “in-store shopping experience” for the online realm.

Customers benefit from convenience and personalized attention, including assistance with product search, product recommendations, promotion highlights, frequently asked questions, product discovery, and secure checkout. For your business, this translates to increased sales and satisfied customers.

Agentforce for Guided Shopping Highlights

Let’s take a look at some of the capabilities.

Capability

Description

Real-time support

  • Provides shoppers with detailed information about products, shipping, and inventory, and gets real-time results
  • Provides timely transactions (for example, purchases, returns, exchanges) without the need for email correspondence

Product discovery

  • Helps shoppers browse and find products more efficiently
  • Suggests products, highlights ongoing promotions, provides detailed product descriptions, and shares customer reviews, helping users make informed purchasing decisions

Easy checkout

  • Confirms order details, assists with payment processing, and addresses any issues that can come up during checkout ensuring a smooth and hassle-free customer experience

Customer service

  • Quickly addresses and resolves customer issues or questions
  • Guides shoppers through product exchanges and returns
  • Connects shoppers to a service rep for more complicated customer service issues

Social media messaging

  • Integrates with social media platforms like Facebook and WhatsApp through a Salesforce org
  • Improves shopper engagement and satisfaction by adding personalized, timely, and friendly shopper connections that promote customer loyalty and sales

Natural language text communication

  • Adds the human element to shopper support with natural language functionality
  • AI agents use natural language text messages, images, and other visuals when interacting with customers

Built-in trust layer

  • Provides a built-in trust layer
  • Includes features like bias assessments; red-teaming (where experts try to “break” the system to find vulnerabilities); personally identifiable information (PII) masking; transparency on AI-produced content; sustainability considerations; and human oversight

Get Started with the Guided Shopping Agent for B2C Storefronts

The Guided Shopping Agent for B2C Storefronts requires licenses, Einstein generative AI activations, Data Cloud, and B2C Commerce SCAPI authorization with Shopper Login API Access Service (SLAS).

Required licenses

  • B2C Commerce Cloud
  • Service Cloud or Sales & Service Edition: EE, UE, or PXE

Required add-on licenses

  • Agentforce

Einstein generative AI options to enable in your org

Agentforce for Guided Shopping requires that you enable these options in your Salesforce org.

  • Einstein generative AI
  • Agentforce

Enable Data Cloud for B2C Commerce

B2C Commerce and Data Cloud Connection

  • Confirm that your B2C instance is connected to Data Cloud.
    Complete the following two set up processes. The B2C Commerce Connection controls the scope of data ingestion from your B2C Commerce instance.
Note

The connector only supports connections to production instances of B2C Commerce.

B2C Commerce SCAPI

  • Create a SLAS client ID and secret

Enable Einstein Generative AI and Agentforce

In this module, we assume you are a B2C Commerce administrator with the proper permissions to set up the Guided Shopping Agent for B2C Storefronts. If you’re not an administrator for B2C Commerce, that’s OK. Read along to learn how your administrator would take the steps in a production org. Don't try to follow these steps in your Trailhead Playground. B2C Commerce and Einstein generative AI aren't available in the Trailhead Playground.

To enable Einstein Generative AI and Agentforce, configure these settings in your Salesforce org.

  1. In your Salesforce org, complete the steps outlined in Set Up Einstein Generative AI. These steps include setting up Data Cloud, turning on Einstein generative AI, setting up Einstein Trust, and turning on Einstein Data Collection and Storage.
  2. To enable Einstein Agents, click Setup and in the Quick Find box, search for and select Agents.
    If you don’t see Agents in Setup, verify that Einstein Generative AI is enabled. If that’s not the issue, make sure you have the right license and user permissions for your agent type.
  3. Turn on Agentforce to get access to the Agentforce (Default) agent.
    After you enable Agentforce, refresh the page to see the +New button to create agents.
  4. Refresh your browser.
  5. From Setup, in the Quick Find box, search for and select Commerce Agentforce Settings.
  6. Turn on Agentforce for Guided Shopping - B2C.

Create a Private SLAS Client

As we mentioned, the Guided Shopping Agent for B2C Storefronts uses the Salesforce Commerce APIs (SCAPI) to access the B2C Commerce platform functionality. SCAPI is secured with the Shopper Login and API Access Services (SLAS).

Most B2C Commerce users have an existing private SLAS client to access SCAPI. This client is typically configured to handle standard API interactions required for their commerce operations. Guided Shopping Agent interactions may require specific permissions or scopes that are not included in your existing private SLAS client. To see if your existing SLAS client is sufficient, review its configuration in Account Manager and ensure it includes the necessary scopes for the Guided Shopping Agent. If the existing client does not meet the requirements, you can create or modify a private SLAS client to include the necessary permissions. Here’s how.

  1. Set up the Shopper Login and API Access Service (SLAS). See Authorization for Shopper APIs and enter this information.
    • Replace the short_code in this URL with the short code that your B2C Commerce instances use. https://short_code.api.commercecloud.salesforce.com/shopper/auth-admin/v1/ui/. Example: https://sandbox-001.api.commercecloud.salesforce.com/shopper/auth-admin/v1/sso/login
      Make sure to include the sites that you want to make SLAS calls, for example, RefArch RefArchGlobal.
    • In the Scopes section, add these scopes.
      • sfcc.shopper-myaccount.baskets
      • sfcc.shopper-discovery-search
      • sfcc.shopper-products
      • sfcc.shopper-myaccount.rw
      • sfcc.shopper-customers.login
      • sfcc.shopper-stores
      • sfcc.shopper-context.rw
      • sfcc.shopper-myaccount.orders
      • sfcc.shopper-customers.register
      • sfcc.shopper-myaccount.addresses.rw
      • sfcc.shopper-myaccount.productlists.rw
      • sfcc.shopper-productlists
      • sfcc.shopper-promotions
      • sfcc.shopper-baskets-orders.rw
      • sfcc.shopper-gift-certificates
      • sfcc.shopper-myaccount.paymentinstruments.rw
      • sfcc.shopper-product-search
      • sfcc.shopper-categories

Example client configuration:

Example of a SLAS client configuration that includes the client name and secret.

Important: After setting up the SLAS client, copy the Client ID (UUID) and secret because you’re shown the secret only once. You use the Client ID and secret later, when you create external credentials for SCAPI access.

  1. Using the client, validate that you can get a SLAS token for a guest shopper. Use Postman or cURL to obtain a SLAS token using the credentials for your environment. This cURL example uses these values:
    • Short code: sandbox-001
    • Organization ID: f_ecom_zyom_006
    • Client ID and secret: my-base64-encoded-client-ID-and-secret(automatically added if you’re using Postman)
    • include: channel_id=RefArch.
curl --location 'https://sandbox-001.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/f_ecom_zyom_006/oauth2/token?channel_id=RefArch' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic my-base64-encoded-client-ID-and-secret' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'channel_id=RefArch'
  • Response:
{
  "access_token" : "eyJ2ZXIiOiIxL...zjtjWTNe3LcmMYEcsef41Kqi4kxF3R_A",
  "id_token" : "",
  "refresh_token" : "CbV...Ro",
  "expires_in" : 1800,
  "refresh_token_expires_in" : 2592000,
  "token_type" : "BEARER",
  "usid" : "105...4b1",
  "customer_id" : "bek...KlJ",
  "enc_user_id" : "adb...ff8",
  "idp_access_token" : "",
  "idp_refresh_token" : "",
  "dnt" : "0"
}

3. Using Postman, test that your client can make a SCAPI call.

Note

For configuration details, see Base URL and Request Formation.

  • Example SCAPI call:
curl --location 'https://sandbox-001.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/f_ecom_zyom_006/products?ids=creative-zen-vM&siteId=RefArch' \
--header 'Authorization: Bearer eyJ2...iHQ' \
--header 'Cookie: BrowserId=7_20t99KEe-K_hMHJ7TaYw'

Find Your Org ID and Short Code in Business Manager

Locate and make note of your org ID and short code. These values are necessary for some agent setup and testing tasks.

  1. Log in to Business Manager and select Administration | Site Development | Salesforce Commerce API Settings.
  2. Copy the Org ID and the short code to use for testing.

Sum It Up

In this unit, you learned about Guided Shopping for B2C Storefronts and its unique set of capabilities for trusted, friendly, and timely online sales, service, and shopping experiences. You also learned how to configure Einstein Generative AI and Agentforce in your Salesforce org, and how to create a private SLAS client for SCAPI access. In the next unit, learn how to connect your Salesforce org to your B2C Commerce instance.

Resources

Comparta sus comentarios de Trailhead en la Ayuda de Salesforce.

Nos encantaría saber más sobre su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios en cualquier momento en el sitio de Ayuda de Salesforce.

Más información Continuar a Compartir comentarios