---
schema_version: "1"
id: a1a14beea74584a1cac8a45fdb7753158bbaedf071ab675bedd583135c5e99a1
title: ConnectApi.CartInput
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_connectapi_input_cart.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_cart.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8984c4cbfbfa52c0c0f19781f567c33025c34397003bfd9ef75a5a23f55a518b
description: A cart.
---
# ConnectApi.CartInput

A cart.

<table class="featureTable sort_table" summary="">
          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader vertical-align-top " id="d577754e27">Property</th>
              <th class="featureTableHeader vertical-align-top " id="d577754e29">Type</th>
              <th class="featureTableHeader vertical-align-top " id="d577754e31">Description</th>
              <th class="featureTableHeader vertical-align-top " id="d577754e33">Required or Optional</th>
              <th class="featureTableHeader vertical-align-top " id="d577754e35">Available Version</th>
            </tr>
          </thead>
          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d577754e27 d577754e35" data-title="Property"><samp class="codeph apex_code">currencyIsoCode</samp></td>

              <td class="entry" headers="d577754e29" data-title="Type">String</td>

              <td class="entry" headers="d577754e31" data-title="Description">Currency ISO code of the cart.</td>

              <td class="entry" headers="d577754e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d577754e27 d577754e35" data-title="Property">57.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d577754e27 d577754e35" data-title="Property"><samp class="codeph apex_code">customFields</samp></td>

              <td class="entry" headers="d577754e29" data-title="Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list" title="Contains methods for the List collection type.">List</a>&lt;<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_sobject.htm#apex_methods_system_sobject" title="Contains methods for the sObject data type."><samp class="codeph apex_code">SObject</samp></a>&gt;
              </td>

              <td class="entry" headers="d577754e31" data-title="Description">Array of sObjects and custom fields for the sObjects. Standard fields are ignored. The custom fields must already be defined for the sObject. Currently, only the WebCart sObject is supported. Field-level security rules from the <a class="xref" href="https://help.salesforce.com/s/articleView?id=commerce.comm_create_shopper_profile.htm&amp;type=5&amp;language=en_US" target="_blank">shopper profile</a> are applied to the custom fields. The rules are applied for registered shoppers and for the guest shopper profile. See <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.264.0.apexcode.meta/apexcode/connectapi_examples_commerce_cart_custom.htm" target="_blank">Create a Cart
                  and Cart Item with Custom Fields in a Commerce Store</a>.</td>

              <td class="entry" headers="d577754e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d577754e27 d577754e35" data-title="Property">61.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d577754e27 d577754e35" data-title="Property"><samp class="codeph apex_code">effective​AccountId</samp></td>

              <td class="entry" headers="d577754e29" data-title="Type">String</td>

              <td class="entry" headers="d577754e31" data-title="Description">ID of the buyer account or guest buyer profile for which the request is made.If unspecified, the default value is determined from context.</td>

              <td class="entry" headers="d577754e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d577754e27 d577754e35" data-title="Property">49.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d577754e27 d577754e35" data-title="Property"><samp class="codeph apex_code">isSecondary</samp></td>

              <td class="entry" headers="d577754e29" data-title="Type">Boolean</td>

              <td class="entry" headers="d577754e31" data-title="Description">Specifies whether the cart is secondary (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>).If unspecified, defaults to <samp class="codeph nolang">false</samp>.</td>

              <td class="entry" headers="d577754e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d577754e27 d577754e35" data-title="Property">53.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d577754e27 d577754e35" data-title="Property"><samp class="codeph apex_code">name</samp></td>

              <td class="entry" headers="d577754e29" data-title="Type">String</td>

              <td class="entry" headers="d577754e31" data-title="Description">Name of the cart. The name can have up to 250 Unicode characters. Avoid using special characters in
                the cart name, including <samp class="codeph nolang">"'&lt;&gt;@!$#&amp;%\{[]}</samp>.<p class="p">If unspecified,
                  a cart name is generated automatically using the pattern, <samp class="codeph nolang">Untitled Cart - [Date] [Time]</samp>.</p>
              </td>

              <td class="entry" headers="d577754e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d577754e27 d577754e35" data-title="Property">49.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d577754e27 d577754e35" data-title="Property"><samp class="codeph nolang">orderOwnerId</samp></td>

              <td class="entry" headers="d577754e29" data-title="Type">String</td>

              <td class="entry" headers="d577754e31" data-title="Description"><span class="ph" id="orderOwnerID"><a name="orderOwnerID"><!-- --></a>ID of the owner of the order.</span></td>

              <td class="entry" headers="d577754e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d577754e27 d577754e35" data-title="Property">58.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d577754e27 d577754e35" data-title="Property"><samp class="codeph apex_code">type</samp></td>

              <td class="entry" headers="d577754e29" data-title="Type"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/connectAPI_enums.htm#cartTypeEnum"><samp class="codeph apex_code">ConnectApi.​CartType</samp></a></td>

              <td class="entry" headers="d577754e31" data-title="Description">Type of cart. Vaues
                are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Cart</samp>—Cart created by a customer.
                  </li>
                  <li class="li">
                    <samp class="codeph nolang">PayNowReadOnly</samp>—Clone of a Template cart that the customer can check out with using the Pay Now feature.
                  </li>
                  <li class="li">
                    <samp class="codeph nolang">Template</samp>—Cart created by an internal user.
                  </li>
                </ul>
                If unspecified, defaults to <samp class="codeph nolang">Cart</samp>.</td>

              <td class="entry" headers="d577754e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d577754e27 d577754e35" data-title="Property">49.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d577754e27 d577754e35" data-title="Property"><samp class="codeph apex_code">typeAsString</samp></td>

              <td class="entry" headers="d577754e29" data-title="Type">String</td>

              <td class="entry" headers="d577754e31" data-title="Description">Type of the cart provided as a string.</td>

              <td class="entry" headers="d577754e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d577754e27 d577754e35" data-title="Property">59.0</td>

            </tr>

          </tbody>
        </table>