Line Item Data

Line items are intended to describe purchasable items. They’re used in cart, catalog, and wish-list interactions.

Fields

Field Name Description
attributes
Type
object
Description
A dictionary of values that you supply.
catalogObjectId
Type
string
Description
Required. A unique identifier representing the catalog object referenced in the line item.
catalogObjectType
Type
string
Description
Required. A name representing the catalog object referenced in the line item.
currency
Type
string
Description
The currency of the price field.
price
Type
number
Description
The price of the catalog object referenced in the line item.
quantity
Type
number
Description
Required. The number of catalog objects in this line item.

Example

Here’s a basic structure of a line item used within an interaction.
1{
2   lineItems: {
3      id: 'line-item-12345',
4      catalogObject: {
5         id: 'catalog-id-12345678',
6         type: 'Product'
7      },
8      attributes: {
9         quantity: 12,
10         price: 2.5,
11         imageUrl: 'https://commerce.salesforce.com/blueshirt.jpg',
12         name: 'blue-shirt'
13      },
14}