Loading
Prepare for Email to Become the Default Login ExperienceRead More
Salesforce Enforces New Security Requirements in Summer 2026Read More
Get Started with B2C Commerce
B2C Shopper Agent | Cart Subagent

B2C Shopper Agent | Cart Subagent

The Cart subagent manages the full cart lifecycle. This subagent adds products and variants, views the cart summary, updates lines, and applies promotion and coupon codes.

Subagent Name Subagent Handles Actions
cart

Manages requests, such as:

  • Add the black one in size 9
  • Change the quantity to 2
  • Remove the sandals
  • Apply code SUMMER20
  • What's in my cart?
  • GetB2CUserAccessToken—authenticates the shopper session (guest or logged-in) before API calls.
  • AddItemToCart—searches the catalog, supports conversational context, facets, refinements, and custom properties.
  • AddCart
  • EditCart
  • ViewCart
  • ApplyCouponToBasket
  • GetB2CProductDetails—full details for a single product ID. Resolves any variants before adding an item to the cart.

Response component: cart. Pulls the standard product components.

To customize it:

  • cart_tool_calling_guidance—cart-scoped tool guidance. The default rule enforces that the subagent adds only variant-level IDs. It also determines whether the agent asks the shopper to pick a variant when the shopper doesn't specify one.
  • enable/disable—controls use of the Cart subagent. If your storefront handles cart functions elsewhere, comment out the Cart subagent to remove the route. You can restore the Cart instructions.
  • SFRA or SCAPI—set useSfraApi to true to route cart actions through SFRA. Set it to false to route through SCAPI.
 
Loading
Salesforce Help | Article