---
schema_version: "1"
id: e047d8cfa2338f612afd9827203e5c1be8f00bca8710e4279e9b770cf3e80cad
title: B2C Commerce | Add Item To Cart
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/agent_ref_b2c_add_item_to_cart.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.agent_ref_b2c_add_item_to_cart.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: dbf3d9230a89f93e94ddcfd0f335ed3e9e2be9c0ab29a29c1cd473ab6031969a
description: Adds items to the cart.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# B2C Commerce | Add Item To Cart

Adds items to the cart.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions with Foundations or <strong>Agentforce 1</strong> Editions. Also requires B2C Commerce.</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
      <colgroup>
        <col style="width:50%">
        <col style="width:50%">
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="col" class="slds-cell-wrap" style="text-align:center;vertical-align:top;" id="d120139e70">User Permissions Needed</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d120139e73">&nbsp;</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td class="slds-cell-wrap" colspan="2" style="vertical-align:top;" headers="d120139e70 d120139e73 ">See <a href="https://help.salesforce.com/s/articleView?id=ai.agent_actions_common_perms.htm&amp;type=5&amp;language=en_US" target="_blank">Common User Access for Standard Agent
              Actions</a>.</td>

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

## Action Details

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">API Name</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">AddItemToCart
            </td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Reference Action Type</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">Standard</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Does this action execute one or more prompt templates?</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">No</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Required Setup</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p><a href="https://help.salesforce.com/s/articleView?id=cc.b2c_shopping_agent_assign_context_variables.htm&amp;language=en_US" target="_blank">Assign Context Variables to Agent Conversations</a>
              </p>
              <p style="margin-bottom:0;"><a href="https://help.salesforce.com/s/articleView?id=cc.b2c_shopping_agent_create_context_variables.htm&amp;language=en_US" target="_blank">Create Context Variables for Messaging
                  Sessions</a>.</p>
            </td>

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

## Guidelines and Considerations

- For information about configuring express payment options related to cart management, see [Set Up Apple Pay and Google Pay for PWA Kit Storefronts](https://help.salesforce.com/s/articleView?id=cc.b2c_shopping_agent_applepay_googlepay_setup.htm&language=en_US).
- To include express checkout buttons on your product detail pages, use 'v2' as the input apiVersion parameter.