Order Interaction

An Order interaction is an ecommerce event used to capture actions related to new, in progress, or completed orders. This is the standard interaction data model for reporting purchases, returns, cancellations, and other order lifecycle events.

The order object defines the details of the transaction, while interaction.name defines the action being taken.

Field NameField TypeDescription
namestringRequired. The type of order interaction that occurred. Use the standard SDK constants for this field. For example, Purchase, Return, and so on.
order.idstringRequired. A unique identifier representing the order.
order.totalValuenumberRequired. The total value of the order.
order.lineItemsLine Item DataAn array of Line Item Data values.
order.currencystringThe currency of the order.
order.attributesobjectA user-supplied value.

Here's the structure of an order interaction with the minimum required fields, lineItems, and optional attributes.

Always use the built-in constants for the interaction.name field to ensure consistency across your instrumentation.

NameValue
SalesforceInteractions.OrderInteractionName.PurchasePurchase
SalesforceInteractions.OrderInteractionName.ReturnReturn
SalesforceInteractions.OrderInteractionName.CancelCancel
SalesforceInteractions.OrderInteractionName.PreorderPreorder
SalesforceInteractions.OrderInteractionName.ExchangeExchange
SalesforceInteractions.OrderInteractionName.ShipShip
SalesforceInteractions.OrderInteractionName.DeliverDeliver

This example shows how to capture a purchase interaction, typically fired once on the order confirmation page.

Here's how to use the sitemap to automatically fire a purchase event.

See Also