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.

Introduced in API version 46.0.

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

  • The WebCart object is available only if the B2B Commerce or D2C Commerce license is enabled.
  • 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: polymorphic

  • Refers to: Account, GuestBuyerProfile, User

  • Type: address
  • Properties: Filter, Nillable
  • Description: The mailing address to which this WebCart is billed.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The city of the billing address.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The country of the billing address.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Type: picklist
  • Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
  • Description: The accuracy rating of the geocode for the billing address.
  • Possible values:
    • Address — Address
    • Block — Block
    • City — City
    • County — County
    • ExtendedZip — ExtendedZip
    • NearAddress — NearAddress
    • Neighborhood — Neighborhood
    • State — State
    • Street — Street
    • Unknown — Unknown
    • Zip — Zip
  • Type: double
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The latitude of the geocode for the billing address.
  • Type: double
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The longitude of the geocode for the billing address.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The postal code for the billing address.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The state of the billing address.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Type: textarea
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The street of the billing address. Enter up to 255 characters.
  • Type: datetime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Introduced: API version 68.0
  • Description: If the advanced cart management feature is enabled, this field shows the ID of the user who locked the cart.
  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 68.0

  • 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.

  • Relationship name: CollaborationLockedBy

  • Relationship type: relationship

  • Refers to: User

  • Type: picklist
  • Properties: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
  • Introduced: API version 68.0
  • Description: If the advanced cart management feature is enabled, this field indicates whether the cart is shared for collaboration.
  • Possible values:
    • None — None
    • Shared — Shared
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 66.0
  • Type: currency

  • Properties: Defaulted on create, Filter, Nillable, Sort

  • Introduced: API version 60.0

  • Default value: 0

  • Type: currency

  • Properties: Defaulted on create, Filter, Nillable, Sort

  • Introduced: API version 60.0

  • Default value: 0

  • 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.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 59.0
  • Description: Company name associated with a delivery for a guest customer.
  • Type: email
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 52.0
  • Description: The email address of a guest buyer.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 52.0
  • Description: The first name of a guest buyer.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 52.0
  • Description: The last name (or surname) of a guest buyer.
  • Type: phone
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 52.0
  • Description: The phone number of a guest buyer.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 52.0
  • Description: The second name of a guest buyer.
  • Type: string
  • Properties: Create, Filter, Group, idLookup, Nillable, Sort, Update
  • Introduced: API version 61.0
  • 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.
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 57.0
  • Description: Reserved for future use.
  • 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.
  • Default value: false
  • Type: boolean
  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update
  • Introduced: API version 53.0
  • Description: Whether the cart is a secondary cart or a primary cart.
  • Default value: false
  • Type: reference

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 67.0

  • Relationship name: LastOperationJob

  • Relationship type: polymorphic

  • Refers to: AsyncApiJob, BackgroundOperation

  • Type: datetime
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: Date when the last repricing was done.
  • Type: string
  • Properties: Create, Filter, Group, idLookup, Sort, Update
  • Description: The name of this WebCart record. Name can be up to 255 characters.
  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort

  • Introduced: API version 58.0

  • Relationship name: OrderOwner

  • Relationship type: relationship

  • Refers to: User

  • 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: relationship

  • Refers to: PaymentGroup

  • 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: polymorphic

  • Refers to: AlternativePaymentMethod, CardPaymentMethod, DigitalWallet

  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The purchase order number. Enter up to 80 characters.
  • Type: int

  • Properties: Defaulted on create, Filter, Group, Nillable, Sort

  • Introduced: API version 67.0

  • Description:

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

    This field is a calculated field.

  • Default value: 0

  • Type: picklist
  • Properties: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
  • Description: The status of this WebCart.
  • Possible values:
    • Active— — Active— — `Cart is created and available for modifications, like adding or removing products or promotions.
    • Checkout— — Checkout— — `Cart is in checkout. If the customer modifies the cart, the current checkout session is canceled.
    • Closed— — Closed— — `Checkout is complete and an order was created. The cart cannot be modified.
    • PendingClosed— — 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— — PendingDelete— — `Cart is marked for delete, but the request isn’t completed yet. The cart can’t be modified.
    • Processing— — Processing— — `Cart is processing. For example, taxes are being calculated. The cart can’t be modified.
  • Type: picklist
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 68.0
  • Type: picklist

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

  • Introduced: API version 55.0

  • Description:

    The type of tax policy. Possible values are:

    This field is available in API version 55.0 and later.

  • Possible values:

    • Automatic — Automatic
    • Net — Net
    • Gross — Gross
  • Type: currency
  • Properties: Defaulted on create, Filter, Nillable, Sort
  • Introduced: API version 52.0
  • Description: A calculated field that reflects the total of all adjustments to the cart subtotal. Adjustments include item, tier, and cart level discounts.
  • Default value: 0
  • 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.

    Although this field is Nillable, if you want to use Commerce Webstore Cart Promotions, this field is required and must have a value greater than or equal to zero (0).

  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Introduced: API version 52.0
  • Description: The sum of all cart items after all price adjustments are applied. Adjustments include various types of discounts.
  • Type: currency
  • Properties: Defaulted on create, Filter, Nillable, Sort
  • Introduced: API version 61.0
  • Description: Total cart level discount amount for the cart.
  • Default value: 0
  • Type: currency
  • Properties: Defaulted on create, Filter, Nillable, Sort
  • Description: The sum of all cart items’ TotalPrice for cart items of the type Charge.
  • Default value: 0
  • Type: currency

  • Properties: Defaulted on create, Filter, Nillable, Sort

  • Introduced: API version 63.0

  • Default value: 0

  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Introduced: API version 63.0
  • Type: currency

  • Properties: Defaulted on create, Filter, Nillable, Sort

  • Introduced: API version 63.0

  • Default value: 0

  • Type: currency

  • Properties: Defaulted on create, Filter, Nillable, Sort

  • Introduced: API version 61.0

  • Default value: 0

  • 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.
  • Default value: 0
  • Type: currency

  • Properties: Defaulted on create, Filter, Nillable, Sort

  • Introduced: API version 63.0

  • Default value: 0

  • Type: currency

  • Properties: Defaulted on create, Filter, Nillable, Sort

  • Introduced: API version 63.0

  • Default value: 0

  • Type: int
  • Properties: Defaulted on create, Filter, Group, Nillable, Sort
  • Introduced: API version 50.0
  • Description: A calculated field that shows the total number of cart line items of type Product with errors.
  • Default value: 0
  • Type: currency
  • Properties: Defaulted on create, Filter, Nillable, Sort
  • Description: Sum of all the cart items’ TotalListPrice.
  • Default value: 0
  • 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.
  • Default value: 0
  • Type: double
  • Properties: Defaulted on create, Filter, Nillable, Sort
  • Description: A count of all the products in the WebCart.
  • Default value: 0
  • Type: currency

  • Properties: Defaulted on create, Filter, Nillable, Sort

  • Introduced: API version 63.0

  • Default value: 0

  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Introduced: API version 63.0
  • Type: currency

  • Properties: Defaulted on create, Filter, Nillable, Sort

  • Introduced: API version 63.0

  • Default value: 0

  • Type: currency
  • Properties: Defaulted on create, Filter, Nillable, Sort
  • Introduced: API version 61.0
  • Description: Total item level discount amount for the cart.
  • Default value: 0
  • Type: currency

  • Properties: Defaulted on create, Filter, Nillable, Sort

  • Introduced: API version 68.0

  • Description:

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

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

  • Default value: 0

  • Type: int
  • Properties: Defaulted on create, Filter, Group, Nillable, Sort
  • Introduced: API version 60.0
  • Description: A calculated field that shows the total number of cart line items of type Product.
  • Default value: 0
  • Type: currency
  • Properties: Defaulted on create, Filter, Nillable, Sort
  • Introduced: API version 59.0
  • Description: The sum of all the cart items’ TotalListAmount for the CartItem type Product.
  • Default value: 0
  • Type: currency
  • Properties: Defaulted on create, Filter, Nillable, Sort
  • Description: The sum of all the cart items’ TotalTaxAmount for the CartItem type Product.
  • Default value: 0
  • Type: currency
  • Properties: Defaulted on create, Filter, Nillable, Sort
  • Introduced: API version 52.0
  • Description: The total of all item discounts related to product promotions.
  • Default value: 0
  • Type: currency
  • Properties: Defaulted on create, Filter, Nillable, Sort
  • Introduced: API version 52.0
  • Description: The total tax adjustment for all item discounts related to product promotions.
  • Default value: 0
  • Type: double

  • Properties: Defaulted on create, Filter, Nillable, Sort

  • Introduced: API version 60.0

  • Default value: 0

  • Type: currency
  • Properties: Filter, Nillable, Sort
  • Description: The sum of all cart items’ TotalTaxAmount, or TotalProductTaxAmount plus TotalDeliveryTaxAmount.
  • Type: picklist
  • Properties: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
  • Description: The WebCart type. Default value is Cart.
  • Possible values:
    • Cart — Cart
    • ConsumerSales — ConsumerSales
    • PayNowReadOnly — PayNowReadOnly
    • ReadOnly — ReadOnly
    • Template — Template
  • Type: int
  • Properties: Defaulted on create, Filter, Group, Nillable, Sort
  • Description: The count of unique product SKUs in the WebCart.
  • Default value: 0
  • 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: relationship

  • Refers to: WebStore

  • 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.

This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version.