---
schema_version: "1"
id: 90a3bf9686c1485976046884af1002bbee8c198c053230bf057be6816c69e7cd
title: CartDeliveryGroup
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_cartdeliverygroup.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_cartdeliverygroup.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 36eb19d3c9ab4b9b78f67dc9917d97365d9a2e4b7d17983a5fb9aeb74e5b9c00
description: Represents shipping information for the delivery of items in an order against a store built with B2B Commerce or D2C Commerce. This object is available in API version 49.0 and later.
---
# CartDeliveryGroup

Represents shipping information for the delivery of items in an order against a store built with B2B Commerce or D2C Commerce. This object is available in API version 49.0 and later.

## Supported Calls

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

## Special Access Rules

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

## Fields

| Field | Details |
| --- | --- |
| CartId | 
Type

reference

Properties

Create, Filter, Group, Sort

Description

The ID the [WebCart](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_webcart.htm "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.") that’s associated with this delivery group.

This field is a relationship field.

Relationship Name

Cart

Relationship Type

Lookup

Refers To

WebCart







 |
| CompanyName | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Company name associated with a delivery. This field is available in API version 59.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:

- USD—U.S. Dollar





 |
| DeliverToAddress | 

Type

address

Properties

Filter, Nillable

Description

The address to which a buyer order is delivered.



 |
| DeliverToCity | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The city to which a buyer order is delivered.



 |
| DeliverToCountry | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The country to which a buyer order is delivered.



 |
| DeliverToFirstName | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The first name of the person set to receive an order. This field is available in API version 57.0 and later.



 |
| DeliverToGeocodeAccuracy | 

Type

picklist

Properties

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

Description

The geocode location to which a buyer order is delivered. Possible values are:

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







 |
| DeliverToLastName | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The last name of the person to whom a buyer order is delivered. This field is available in API version 57.0 and later.



 |
| DeliverToLatitude | 

Type

double

Properties

Create, Filter, Nillable, Sort, Update

Description

The latitude of a buyer delivery location.



 |
| DeliverToLongitude | 

Type

double

Properties

Create, Filter, Nillable, Sort, Update

Description

The longitude of a buyer delivery location.



 |
| DeliverToName | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The name of the person to deliver a buyer order to. This field is set based on the Name field of the ContactPointAddress associated with this delivery group. ContactPointAddress.Name is generated by the system using the first and last names entered by a buyer during checkout.



 |
| DeliverToPostalCode | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The postal code to which to deliver a buyer order.



 |
| DeliverToState | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The state to which to deliver a buyer order.



 |
| DeliverToStreet | 

Type

textarea

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The street to which to deliver a buyer order.



 |
| DeliveryMethodId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The ID for the delivery method to use to deliver a buyer order. Populated if the selected CartDeliveryGroupMethod only has the ShippingFee populated, but it has reference to an existing DeliveryMethodId which contains the fields Carrier, ClassOfService, and ReferenceNumber. If not, the SelectedDeliveryMethod field is used.

This field is a relationship field.

This field is deprecated in API version 64.0 and will be removed in API version 66.0. Instead, use the DeliveryMethodId field on the CartDeliveryGroupMethod object.

Relationship Name

DeliveryMethod

Relationship Type

Lookup

Refers To

OrderDeliveryMethod



 |
| DesiredDeliveryDate | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

The date that a buyer requests to have an order delivered.



 |
| GiftMessage | 

Type

textarea

Properties

Create, Nillable, Update

Description

Personalized gift message for the order. This field is available in API version 64.0 and later.



 |
| GiftToName | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The name of the recipient for a gift order. This field is available in API version 64.0 and later.



 |
| GrandTotalAmount | 

Type

currency

Properties

Filter, Nillable, Sort

Description

Sum of all cart items’ TotalAmount, or CartDeliveryGroup TotalAmount plus CartDeliveryGroup TotalTaxAmount.



 |
| IsDefault | 

Type

boolean

Properties

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

Description

Indicates if the delivery group is the default. This field is available in API version 59.0 and later.

The default value is false.

B2B and D2C stores create a default delivery group, along with a WebCart, when a customer adds an item to cart and doesn't have an existing cart. The default cart delivery group is needed to complete the checkout flow, and can't be replaced by a non-default cart delivery group. If you customize the standard checkout flow, make sure that you don't delete the default cart delivery group.



 |
| IsGift | 

Type

boolean

Properties

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

Description

Indicates if the delivery group is a gift. This field is available in API version 64.0 and later.

The default value is false.



 |
| Name | 

Type

string

Properties

Create, Filter, Group, idLookup, Sort, Update

Description

The name of this CartDeliveryGroup record. Name can be up to 255 characters. In API version 62.0 and later, if IsDefault is true, the Name is Shipment1, a localized string. In prior API versions, the Name for a default delivery group was Cart Delivery Group. Due to this change, any queries intended to identify default delivery groups should use the IsDefault rather than Name field.



 |
| SelectedDeliveryMethodId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

ID of the selected cart delivery group method. Populated if the selected CartDeliveryGroupMethod has the fields Carrier, ClassOfService, ReferenceNumber, and ShippingFee, but the DeliveryMethodId is null. If not, the DeliveryMethodId field is used. This field is available in API version 59.0 or later.

This field is a relationship field.

Relationship Name

SelectedDeliveryMethod

Relationship Type

Lookup

Refers To

CartDeliveryGroupMethod



 |
| ShipToPhoneNumber | 

Type

phone

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Phone number associated with a delivery. This field is available in API version 59.0 and later.



 |
| ShippingInstructions | 

Type

textarea

Properties

Create, Nillable, Update

Description

Instructions for delivering an order.



 |
| TotalAdjustmentAmount | 

Type

currency

Properties

Filter, Nillable, Sort

Description

The total amount of all promotional adjustments on the cart delivery group. This field is available in API version 54.0 and later.

For product bundles, this includes the aggregate adjustments of all child components.





 |
| TotalAdjustmentTaxAmount | 

Type

currency

Properties

Filter, Nillable, Sort

Description

The total tax amount for all promotional adjustments on the cart delivery group. This field is available in API version 54.0 and later.

For product bundles, this includes the aggregate of the tax amounts for all child components’ adjustments.





 |
| TotalAmount | 

Type

currency

Properties

Filter, Nillable, Sort

Description

The sum of all cart items TotalPrice, or TotalProductAmount plus TotalChargeAmount.

For product bundles, this includes the aggregate of all child component prices.





 |
| TotalCartItemCount | 

Type

int

Properties

Filter, Group, Nillable, Sort

Description

The number of cart items, including their quantities, of the type PRODUCT in the delivery group.

For product bundles, this count includes only the parent component.

If the total quantity of cart items of type PRODUCT in the delivery group exceeds the system-defined maximum (INT\_MAX), this field is set to INT\_MAX.



 |
| TotalChargeAmount | 

Type

currency

Properties

Filter, Nillable, Sort

Description

The sum of all the cart items TotalPrice for all cart items of type CHARGE. Cart items can be of type Product or Charge.

For product bundles, if a child component includes a cart item of type CHARGE, its amount is aggregated with the parent’s cart item's total charge amount.





 |
| TotalChargeTaxAmount | 

Type

currency

Properties

Filter, Nillable, Sort

Description

The sum of all the cart items TotalTaxAmount for all cart items of type CHARGE. Cart items can be of type Product or Charge.

For product bundles, this includes the aggregate of all tax amounts associated with bundle-level charges, including the taxes of individual child products.





 |
| TotalProductAmount | 

Type

currency

Properties

Filter, Nillable, Sort

Description

The sum of all the cart items TotalPrice for all cart items of type PRODUCT. Cart items can be of type Product or Charge.

For product bundles, this includes the aggregate of all child component prices.





 |
| TotalProductTaxAmount | 

Type

currency

Properties

Filter, Nillable, Sort

Description

The sum of all the cart items TotalTaxAmount for all cart items of type PRODUCT. Cart items can be of type Product or Charge.

For product bundles, this includes the aggregate of all child component taxes based on their individual prices.





 |
| TotalTaxAmount | 

Type

currency

Properties

Filter, Nillable, Sort

Description

The sum of all cart items TotalTaxAmount, or the combined value of TotalProductTaxAmount plus TotalChargeTaxAmount.

For product bundles, this includes the aggregate of all child component taxes based on their individual prices.





 |

## Associated Objects

[CartDeliveryGroupChangeEvent](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.