Line Item Data

A line item is used to describe a single, specific instance of a purchasable item as it appears within a transaction, such as a shopping cart, an order, or a return.

Line items are only used within transactional interactions, specifically:

Line item objects are typically passed as an array (even if only one item is present) under the lineItems property of the main event payload.

FieldTypeDescription
catalogObjectTypestringRequired. The type of catalog object being referenced (for example, Product, Service).
catalogObjectIdstringRequired. The unique identifier for the specific item (such as, SKU).
quantitynumberRequired. The number of units of this item in the transaction.
pricenumberThe unit price of the item.
currencystringThe currency code for the price field (for example, USD, EUR).
attributesobjectAn object for any custom data specific to this line item.
FieldTypeDescription
attributesobjectAn object for any custom data specific to this line item.
catalogObjectIdstringRequired. A unique identifier representing the catalog object referenced in the line item.
catalogObjectTypestringRequired. A name representing the catalog object referenced in the line item.
currencystringThe currency of the price field.
pricenumberThe price of the catalog object referenced in the line item.
quantitynumberRequired. The number of catalog objects in this line item.

This example shows how a line item is structured when used within a Cart View interaction, typically defined within a Sitemap to collect cart details on the cart page.

See Also