---
schema_version: "1"
id: 446a2214ece49842cc24a216525a94714c40e49f0295d7a8ca1803dfaf2198be
title: WebCart
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_webcart.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_webcart.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 503b54b1017040f449aeaee814f27dc1eef0bf99317759b81b8f2fd9a56ed361
description: Represents an online shopping cart for a store built with B2B Commerce or D2C Commerce, with total amounts for products, shipping and handling, and taxes. This object is available in API version 49.0 and later.
---
# WebCart

Represents an online shopping cart for a store built with B2B Commerce or D2C Commerce, with total amounts for products, shipping and handling, and taxes. This object is available in API version 49.0 and later.

## Supported Calls

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), undelete(), update(), upsert()

## Special Access Rules

The WebCart object is available only if the B2B Commerce or D2C Commerce license is enabled.

## Fields

| Field | Details |
| --- | --- |
| AccountId | 
Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

ID of the account that owns this WebCart. In API version 51.0 and later, if the WebCart was created through Guest Browsing, this ID is the ID of the GuestBuyerProfile.

This field is a polymorphic relationship field.

Relationship Name

Account

Relationship Type

Lookup

Refers To

Account



 |
| BillingAddress | 

Type

address

Properties

Filter, Nillable

Description

The mailing address to which this WebCart is billed.



 |
| BillingCity | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The city of the billing address.



 |
| BillingCountry | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The country of the billing address.



 |
| BillingGeocodeAccuracy | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The accuracy rating of the geocode for the billing address. Possible values are:

- Address
- Block
- City
- County
- ExtendedZip
- NearAddress
- Neighborhood
- State
- Street
- Unknown
- Zip







 |
| BillingLatitude | 

Type

double

Properties

Create, Filter, Nillable, Sort, Update

Description

The latitude of the geocode for the billing address.



 |
| BillingLongitude | 

Type

double

Properties

Create, Filter, Nillable, Sort, Update

Description

The longitude of the geocode for the billing address.



 |
| BillingPostalCode | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The postal code for the billing address.



 |
| BillingState | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The state of the billing address.



 |
| BillingStreet | 

Type

textarea

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The street of the billing address. Enter up to 255 characters.



 |
| CollaborationLockedAt | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

If the advanced cart management feature is enabled, this field shows the ID of the user who locked the cart.

This field is available in API version 67.0 and later.



 |
| CollaborationLockedById | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

If the advanced cart management feature is enabled, this field shows the date and time when the user locked the cart.

This field is a relationship field.

This field is available in API version 67.0 and later.

Relationship Name

CollaborationLockedBy

Refers To

User



 |
| CollaborationStatus | 

Type

picklist

Properties

Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

If the advanced cart management feature is enabled, this field indicates whether the cart is shared for collaboration.

Possible values are:

- None
- Shared

This field is available in API version 67.0 and later.



 |
| CurrencyIsoCode | 

Type

picklist

Properties

Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The ISO code for the currency that’s specified on the buyer’s account. Default value is USD. Possible values are:

- EUR—Euro
- USD—U.S. Dollar

Although this field is Nillable, if you want to use [Commerce Webstore Cart Promotions](https://developer.salesforce.com/docs/atlas.en-us.264.0.chatterapi.meta/chatterapi/connect_resources_commerce_webstore_cart_promotions.htm) with multi-currency enabled, this field is required.



 |
| GrandTotalAmount | 

Type

currency

Properties

Filter, Nillable, Sort

Description

Sum of all cart items’ TotalAmount, or WebCart TotalAmount plus WebCart TotalTaxAmount. This value includes all taxes and adjustments.



 |
| GuestCompanyName | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Company name associated with a delivery for a guest customer. This field is available in API version 59.0 and later.



 |
| GuestEmailAddress | 

Type

email

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The email address of a guest buyer.

This field is available in API version 52.0 and later.



 |
| GuestFirstName | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The first name of a guest buyer.

This field is available in API version 52.0 and later.



 |
| GuestLastName | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The last name (or surname) of a guest buyer.

This field is available in API version 52.0 and later.



 |
| GuestPhoneNumber | 

Type

phone

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The phone number of a guest buyer.

This field is available in API version 52.0 and later.



 |
| GuestSecondName | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The second name of a guest buyer.

This field is available in API version 52.0 and later.



 |
| InitialOrderReferenceNumber | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

A unique identifier assigned to the WebCart at the beginning of the checkout process. Initially populated when the checkout process is initiated, the InitialOrderReferenceNumber is then associated with the order created when the checkout is complete.

This field is available in API version 61.0 and later.



 |
| InventoryReservationIdentifier | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

Reserved for future use.

This field is available in API version 57.0 and later.



 |
| IsRepricingNeeded | 

Type

boolean

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

Whether the cart has changed since the last repricing. The default value is False.



 |
| IsSecondary | 

Type

boolean

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

Whether the cart is a secondary cart or a primary cart.

This field is available in API version 52.0 and later.



 |
| LastRepricingDate | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

Date when the last repricing was done.



 |
| Name | 

Type

string

Properties

Create, Filter, Group, idLookup, Sort, Update

Description

The name of this WebCart record. Name can be up to 255 characters.



 |
| OwnerId | 

Type

reference

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

The ID of the owner of this WebCart.

This field is a polymorphic relationship field.

Relationship Name

Owner

Relationship Type

Lookup

Refers To

Group, User



 |
| PaymentGroupId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The ID of the WebCart payment group.

This field is a relationship field.

Relationship Name

PaymentGroup

Relationship Type

Lookup

Refers To

PaymentGroup



 |
| PaymentMethodId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The method of payment for this WebCart.

This field is a polymorphic relationship field.

Relationship Name

PaymentMethod

Relationship Type

Lookup

Refers To

AlternativePaymentMethod, CardPaymentMethod, DigitalWallet



 |
| PoNumber | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The purchase order number. Enter up to 80 characters.



 |
| QuoteLineItemCount | 

Type

int

Properties

Defaulted on create, Filter, Group, Nillable, Sort

Description

Tracks the count of items added to the webcart from quotes.

This field is a calculated field.



 |
| Status | 

Type

picklist

Properties

Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The status of this WebCart. Possible values are:

- Active—Cart is created and available for modifications, like adding or removing products or promotions.
- Checkout—Cart is in checkout. If the customer modifies the cart, the current checkout session is canceled.
- Closed—Checkout is complete and an order was created. The cart cannot be modified.
- PendingClosed—Cart is marked to be closed, but the request isn't completed yet. The cart can’t be modified. This value is available in API version 57.0 and later.
- PendingDelete—Cart is marked for delete, but the request isn't completed yet. The cart can’t be modified.
- Processing—Cart is processing. For example, taxes are being calculated. The cart can’t be modified.







 |
| TaxLocaleType | 

Type

picklist

Properties

Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The type of tax locale. Possible values are:

- Net
- Gross

This field is available in API versions 52.0 to 54.0.



 |
| TaxType | 

Type

picklist

Properties

Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The type of tax policy. Possible values are:

- Automatic
- Net
- Gross

This field is available in API version 55.0 and later.



 |
| TotalAdjustmentAmount | 

Type

currency

Properties

Defaulted on create, Filter, Nillable, Sort

Description

A calculated field that reflects the total of all adjustments to the cart subtotal. Adjustments include item, tier, and cart level discounts.



 |
| TotalAmount | 

Type

currency

Properties

Filter, Nillable, Sort

Description

The sum of all cart items’ TotalPrice, or TotalProductAmount plus TotalChargeAmount. If the store tax type is Gross, the sum includes taxes.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

Although this field is Nillable, if you want to use [Commerce Webstore Cart Promotions](https://developer.salesforce.com/docs/atlas.en-us.264.0.chatterapi.meta/chatterapi/connect_resources_commerce_webstore_cart_promotions.htm), this field is required and must have a value greater than or equal to zero (0).















 |
| TotalAmountAfterAllAdjustments | 

Type

currency

Properties

Filter, Nillable, Sort

Description

The sum of all cart items after all price adjustments are applied. Adjustments include various types of discounts.

This field is available in API version 52.0 and later.



 |
| TotalCartLevelAdjAmount | 

Type

currency

Properties

Defaulted on create, Filter, Nillable, Sort

Description

Total cart level discount amount for the cart.

This field is available in API version 61.0 and later.



 |
| TotalChargeAmount | 

Type

currency

Properties

Defaulted on create, Filter, Nillable, Sort

Description

The sum of all cart items’ TotalPrice for cart items of the type Charge.



 |
| TotalChargeTaxAmount | 

Type

currency

Properties

Defaulted on create, Filter, Nillable, Sort

Description

The sum of all the cart items’ TotalTaxAmount for cart items of the type Charge.



 |
| TotalLineItemsWithErrors | 

Type

int

Properties

Defaulted on create, Filter, Group, Nillable, Sort

Description

A calculated field that shows the total number of cart line items of type Product with errors.

This field is available in API version 50.0 and later.



 |
| TotalListAmount | 

Type

currency

Properties

Defaulted on create, Filter, Nillable, Sort

Description

Sum of all the cart items’ TotalListPrice.



 |
| TotalProductAmount | 

Type

currency

Properties

Defaulted on create, Filter, Nillable, Sort

Description

The sum of all the cart items’ TotalPrice for cart items of the type Product.



 |
| TotalProductCount | 

Type

double

Properties

Defaulted on create, Filter, Nillable, Sort

Description

A count of all the products in the WebCart.



 |
| TotalProductItemAdjAmount | 

Type

currency

Properties

Defaulted on create, Filter, Nillable, Sort

Description

Total item level discount amount for the cart.

This field is available in API version 61.0 and later.



 |
| TotalProductItemAdjTaxAmount | 

Type

currency

Properties

Defaulted on create, Filter, Nillable, Sort

Description

The total tax on itemized adjustments, including discounts and surcharges, across all product items in the cart.

This field is available in API version 68.0 and later.

For WebCart records created before the 68.0 version or before Winter ’27, this field value is Null.



 |
| TotalProductLineItemCount | 

Type

int

Properties

Defaulted on create, Filter, Group, Nillable, Sort

Description

A calculated field that shows the total number of cart line items of type Product.

This field is available in API version 60.0 and later.



 |
| TotalProductListAmount | 

Type

currency

Properties

Defaulted on create, Filter, Nillable, Sort

Description

The sum of all the cart items’ TotalListAmount for the CartItem type Product.

This field is available in API version 59.0 and later.



 |
| TotalProductTaxAmount | 

Type

currency

Properties

Defaulted on create, Filter, Nillable, Sort

Description

The sum of all the cart items’ TotalTaxAmount for the CartItem type Product.



 |
| TotalPromoAdjustmentAmount | 

Type

currency

Properties

Defaulted on create, Filter, Nillable, Sort

Description

The total of all item discounts related to product promotions.

This field is available in API version 52.0 and later.



 |
| TotalPromoAdjustmentTaxAmount | 

Type

currency

Properties

Defaulted on create, Filter, Nillable, Sort

Description

The total tax adjustment for all item discounts related to product promotions.

This field is available in API version 52.0 and later.



 |
| TotalTaxAmount | 

Type

currency

Properties

Filter, Nillable, Sort

Description

The sum of all cart items’ TotalTaxAmount, or TotalProductTaxAmount plus TotalDeliveryTaxAmount.



 |
| Type | 

Type

picklist

Properties

Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The WebCart type. Default value is Cart. Possible values are:

- Cart
- ConsumerSales
- PayNowReadOnly
- ReadOnly
- Template





 |
| UniqueProductCount | 

Type

int

Properties

Defaulted on create, Filter, Group, Nillable, Sort

Description

The count of unique product SKUs in the WebCart.



 |
| WebStoreId | 

Type

reference

Properties

Create, Filter, Group, Sort, Update

Description

The store ID related to this WebCart.

This field is a relationship field.

Relationship Name

WebStore

Relationship Type

Lookup

Refers To

WebStore



 |

## Usage Notes

- In a B2B Commerce for Lightning store, customers who created custom components for adding items to carts noticed that, after adding items, the cart badge didn’t refresh. A hard refresh causes the value to properly update.

## Associated Objects

This object has the following associated objects. Unless it’s noted, associated objects are available in the same API version as this object.

[WebCartChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_change_event.htm "A ChangeEvent object is available for each object that supports Change Data Capture. You can subscribe to a stream of change events using Change Data Capture to receive data tied to record changes in Salesforce. Changes include record creation, updates to an existing record, deletion of a record, and undeletion of a record. A change event isn’t a Salesforce object—it doesn’t support CRUD operations or queries. It’s included in the object reference so you can discover which Salesforce objects support change events.") (API version 58.0)

Change events are available for the object.

[WebCartHistory](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_webcarthistory.htm "WebCartHistory represents the history of changes to the values in the fields of the WebCart object.")

History is available for tracked fields of the object.

[WebCartOwnerSharingRule](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_ownersharingrule.htm "StandardObjectNameOwnerSharingRule is the model for all owner sharing rule objects associated with standard objects. These objects represent a rule for sharing a standard object with users other than the owner.")

Sharing rules are available for the object.

[WebCartShare](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_share.htm "StandardObjectNameShare is the model for all share objects associated with standard objects. These objects represent a sharing entry on the standard object.")

Sharing is available for the object.

#### See Also

- [Commerce Webstore Cart Promotions](https://developer.salesforce.com/docs/atlas.en-us.264.0.chatterapi.meta/chatterapi/connect_resources_commerce_webstore_cart_promotions.htm "Commerce Webstore Cart Promotions - html (New Window)")
- [Commerce Webstore Promotions, Associate Action](https://developer.salesforce.com/docs/atlas.en-us.264.0.chatterapi.meta/chatterapi/connect_resources_commerce_webstore_promotions_actions_associate.htm "Commerce Webstore Promotions, Associate Action - html (New Window)")
- [Commerce Webstore Promotions, Execute Action](https://developer.salesforce.com/docs/atlas.en-us.264.0.chatterapi.meta/chatterapi/connect_resources_commerce_webstore_promotions_actions_execute.htm "Commerce Webstore Promotions, Execute Action - html (New Window)")
- [_Salesforce DX Developer Guide_: Get Started with Scratch Org](https://developer.salesforce.com/docs/atlas.en-us.264.0.sfdx_dev.meta/sfdx_dev/sfdx_dev_snapshots_get_started.htm)