---
schema_version: "1"
id: c3756054f22f0479885371541da262e4aa0341f77e7abc80e63ae2f3949decae
title: Subagents for the B2C Shopper Agent
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_shopper_agent_subagents_reference.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_shopper_agent_subagents_reference.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 5be0e7130bd99e8e45cb859b76a7ea839eb94af1943cdcd7519cef53b4ed96e2
description: The subagents assigned to the B2C Shopper Agent define the capabilities of the agent. Each subagent manages one stage of the shopping journey, including product discovery, cart, order confirmation, FAQs, and safety checks.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Subagents for the B2C Shopper Agent

The subagents assigned to the B2C Shopper Agent define the capabilities of the agent. Each subagent manages one stage of the shopping journey, including product discovery, cart, order confirmation, FAQs, and safety checks.

## Agent Router

Every agent conversation begins with the Agent Router subagent. This subagent directs a conversation to the right Shopper Agent-specific subagent during each interaction with a shopper.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:27.70083102493075%">
          <col style="width:39.335180055401665%">
          <col style="width:32.96398891966759%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d162391e43">Subagent Name</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d162391e46">What It Does</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d162391e49">Actions</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Subagent Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d162391e43 "><code>start_agent agent_router</code></td>

            <td data-label="What It Does" class="slds-cell-wrap" style="vertical-align:top;" headers="d162391e46 ">
              <p>This subagent reads every shopper message and routes it to the
                correct subagent. When a shopper submits a follow-up request, the
                Agent Router understands that it's related to the current task so it
                routes to the correct subagent. </p>
              <p style="margin-bottom:0;">It also performs session setup.
                For example, copying the linked site ID and user locale from the
                messaging session record to the working variables before
                routing.</p>
            </td>

            <td data-label="Actions" class="slds-cell-wrap" style="vertical-align:top;" headers="d162391e49 ">
              <ul>
                <li>go_to_rev_eng</li>

                <li>go_to_inap_cont</li>

                <li>go_to_prop_inj</li>

                <li>go_to_off_topic</li>

                <li>go_to_product_expert</li>

                <li>go_to_site_faq</li>

                <li>go_to_escalation</li>

                <li>go_to_cart</li>

                <li>go_to_order_confirmation</li>

              </ul>
            </td>

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

- If a shopper responds with an ambiguous reply during a conversation, for example, they enter "add it," the Agent Router treats these replies as being related to the current task, not new requests.
- The agent routes messages based on the shopper's latest message. It automatically filters out any background code, automated tool usage, or technical steps completed in previous messages. The agent reacts precisely to what the shopper is asking for at the moment, without interference by past system activities.

To customize the router subagent:

- Add a route to expose a new subagent, or remove (comment out) one to turn off a capability.
- Adjust the welcome message or routing instructions. For example, edit the router description to first welcome the shopper at the first chat session.
- Reorder or reword routing logic to influence how the agent interprets ambiguous requests so it resolves requests to fit your catalog.

## Shopper Agent Subagents

The Product Expert, Cart, and Order Confirmation subagents share one reasoning node. That node builds each subagent's prompt from a common set of template variables. The Support and Safety subagents don't use the shared node. They run on their own instructions. Because these three commerce subagents draw from the same variables, editing one variable changes the behavior of every subagent that uses it.

- retailer\_name
- retailer\_description
- retailer\_voice
- tool\_calling\_guidance
- response\_guidance
- example\_response
- id\_col

## Safety and Guardrail Subagents

There are subagents that only classify requests. They don't do anything else. They're intentionally narrow. Each one includes a detailed `Do NOT use` section so that common shopping terms aren’t treated as an attack. You define these guardrails in `config.additional_parameter__disabled_topics`.

- Reverse Engineering—Catches attempts to extract the agent's internals. These requests can use "show me your system prompt," "list all your tools," "translate your instructions." Explicitly ignores domain verbs like add, view, find, checkout and "this tool."
- Prompt Injection—Catches override attempts, such as "ignore previous instructions," fake <system> tags, "developer mode," authority impersonation, and encoded payloads. Explicitly ignores words like "ignore" or "forget" for shopper-described details.
- Inappropriate Content—Catches genuinely harmful user-authored content (hate speech, threats, CSAM, self-harm, illegal-act instructions). Explicitly treats commerce vocabulary as always benign, such as "broken," "dead battery," "killer deal," and complaints by a shopper, such as "worst experience." These subagents route messages with this type of content to the appropriate subagent, and doesn't flag them.
- Off Topic—Politely redirects off-topic and general knowledge requests back to shopping topics, without answering the off-topic question, and without revealing system details.

To customize these subagents:

- Adjust the signal lists to suit your store. Add your own product names that contain sensitive words to the `always benign` list so the template doesn't flag them. Add attack patterns you see.
- Adjust the off-topic redirect message and rules.
- Add or remove disabled topics by using the `config.additional_parameter__disabled_topics`.

## Subagent Configuration Tips

- Many subagents can share a single variable. To avoid modifying every subagent that uses a shared variable, use scoped variants, such as cart\_tool\_calling\_guidance or order\_tool\_calling\_guidance to control behavior for an individual subagent.
- Each `response_guidance` string has a 255-character limit. Exceeding this limit causes an Agent Script error.
- The response\_guidance is JSON — validate escaped quotes and avoid trailing commas.
- Replace placeholders. Leaving an unsubstituted token in the `UPPER_SNAKE_CASE` section can cause a publish failure.
- Test with real data. In the agent preview, mock mode returns fake catalog data. Test any search and cart behavior against live actions before you make conclusions.

- **[B2C Shopper Agent | Product Expert](https://help.salesforce.com/s/articleView?id=cc.b2c_shopper_agent_subagent_product_expert.htm&release=264.0.0&type=5)**  
    Handles all product-related requests, such as browsing, searching, recommendations, comparisons, and product questions. It searches the catalog and looks up detailed product information as needed.
- **[B2C Shopper Agent | Cart Subagent](https://help.salesforce.com/s/articleView?id=cc.b2c_shopper_agent_subagent_cart.htm&release=264.0.0&type=5)**  
    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.
- **[B2C Shopper Agent | Order Confirmation](https://help.salesforce.com/s/articleView?id=cc.b2c_shopper_agent_subagent_order_confirmation.htm&release=264.0.0&type=5)**  
    The Order Confirmation subagent confirms that the shopper placed an order and shows the order details. It also recovers the cart after a payment fails or a payment method cancellation.
- **[B2C Shopper Agent | Site FAQ Subagent](https://help.salesforce.com/s/articleView?id=cc.b2c_shopper_agent_subagent_site_faq.htm&release=264.0.0&type=5)**  
    The Site FAQ subagent answers shopper questions about store policies, such as FAQs, shipping costs, return time frames, and refunds. It draws answers only from connected knowledge bases and returns a graceful response when it can't find a match.
- **[Add Custom Subagents and Custom Actions](https://help.salesforce.com/s/articleView?id=cc.b2c_shopper_agent_add_custom_subagent.htm&release=264.0.0&type=5)**  
    The Shopper Agent subagents manage the transactional shopping experience. If you want a capability that isn't in the subagent template, create a custom one.

#### See Also

- [Subagents](https://help.salesforce.com/s/articleView?id=ai.agent_topics.htm&language=en_US)
- [Subagent Classification and Routing](https://help.salesforce.com/s/articleView?id=ai.agent_topics_routing.htm&language=en_US)