ConnectApi.CartItemInput

An item in a cart.

PropertyTypeDescriptionRequired or OptionalAvailable Version
cartDeliveryGroupIdStringID of the cart delivery group.Optional59.0
customFieldsList<SObject>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 CartItem sObject is supported. Field-level security rules from the shopper profile are applied to the custom fields. The rules are applied for registered shoppers and for the guest shopper profile. The custom fields can be of type Checkbox, Currency, Date, Email, LongTextArea, Number, Percent, Phone, Text, TextArea, Url, Address, or Location. The customFields property isn’t supported in stores built on an Aura template. See Create a Cart and Cart Item with Custom Fields in a Commerce Store.Optional61.0
productIdStringID of the product.Required when adding an item to a cart
Not supported when updating a cart item
49.0
productSellingModelIdStringThe ID of the product selling model associated with Product2.Optional59.0
quantityStringQuantity of the cart item. Use a value that can be converted to BigDecimal.Required49.0
subscriptionTermIntegerThe total number of terms in the subscription period.Optional59.0
subTypeConnectApi.​CartItemSubTypeSubtype of item in a cart.Possible values are:
  • Bonus—A bonus product.
  • Gift—A gift product.
Optional64.0
typeConnectApi.​CartItemTypeType of item in a cart. Value is Product.
  • DeliveryCharge
  • Product
Required when adding an item to a cart
Not supported when updating a cart item
49.0