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.
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 |
|
Product discovery |
|
Easy checkout |
|
Customer service |
|
Social media messaging |
|
Natural language text communication |
|
Built-in trust layer |
|
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
- Turn on Data Cloud and connect it to your B2C Commerce instance. see Turn On Data Cloud.
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.-
Set up the B2C Commerce connection. This integration set up allows Data Cloud to import data from your B2C Commerce storefront.
-
Set up the B2C Commerce connection. This integration set up allows Data Cloud to import data from your B2C Commerce storefront.
-
Create a B2C Commerce data stream. The data stream provides a mechanism by which data can flow to Data Cloud from your B2C Commerce instance.
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.
- 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.
- 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.
- 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.
- Refresh your browser.
- From Setup, in the Quick Find box, search for and select Commerce Agentforce Settings.
- 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.
- 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:
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.
- 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
.
- Short code:
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.
- 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.
- Log in to Business Manager and select Administration | Site Development | Salesforce Commerce API Settings.
- 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.