---
schema_version: "1"
id: 455bdf5db997c0c5fa112e2f678200bb4ca365918d31efac90c683a7c58fcc61
title: B2C Shopper Agent | Cart Subagent
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_shopper_agent_subagent_cart.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_shopper_agent_subagent_cart.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 804f5c0fc88805b3e57b73c4caf8d90f2d0d7c0e5568f1c6c81e470912d167f8
description: 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.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# 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.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:31.347962382445143%">
          <col style="width:31.347962382445143%">
          <col style="width:37.30407523510972%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d116597e40">Subagent Name</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d116597e43">Subagent Handles</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d116597e46">Actions</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Subagent Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d116597e40 "><code>cart</code></td>

            <td data-label="Subagent Handles" class="slds-cell-wrap" style="vertical-align:top;" headers="d116597e43 ">
              <p>Manages requests, such as: </p>
              <ul>
                <li>Add the black one in size 9</li>

                <li>Change the quantity to 2</li>

                <li>Remove the sandals</li>

                <li>Apply code SUMMER20</li>

                <li>What's in my cart?</li>

              </ul>
            </td>

            <td data-label="Actions" class="slds-cell-wrap" style="vertical-align:top;" headers="d116597e46 ">
              <ul>
                <li>GetB2CUserAccessToken—authenticates the shopper session
                  (guest or logged-in) before API calls.</li>

                <li>AddItemToCart—searches the catalog, supports conversational
                  context, facets, refinements, and custom properties.</li>

                <li>AddCart</li>

                <li>EditCart</li>

                <li>ViewCart</li>

                <li>ApplyCouponToBasket</li>

                <li>GetB2CProductDetails—full details for a single product ID.
                  Resolves any variants before adding an item to the
                  cart.</li>

              </ul>
            </td>

          </tr>
        </tbody>
      </table>

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.