PurchaseOrderEvent

Package: com.salesforce.marketingcloud.sfmcsdk.components.events

SDK Version: SFMC SDK v3.1.0 (Salesforce Marketing Cloud Unified SDK 11.0.0)

Platform: androidJvm

An E-commerce event for when a user makes a purchase.

Contains the order information associated with this event.

The Event category Name. Category contains list of allowed values.

Defines the priority level for the engagement event.

The Event attributes for this event.

Returns: A map containing string keys and any-type values representing event attributes.

The name for the event. This value must match the Event Name used when creating the event in the Marketing Cloud UI for any action to result from tracking this event.

Returns: The event name as a string.

The order property contains an Order data class with the following structure:

Order Properties:

PropertyTypeDefaultDescription
idStringrequiredA unique identifier for the order
lineItemsList<LineItem>listOf()A list of line item data values
totalValueDouble?nullThe total monetary value of the order
currencyString?nullThe currency code for the order’s total value
attributesMap<String, Any>mapOf()User-supplied custom attribute map

Other OrderEvent subclasses in the same package:

  • PreorderEvent - Represents a preorder event
  • CancelOrderEvent - Represents an order cancellation event
  • ShipOrderEvent - Represents an order shipment event
  • DeliverOrderEvent - Represents an order delivery event
  • ReturnOrderEvent - Represents an order return event
  • ExchangeOrderEvent - Represents an order exchange event
  • PurchaseOrderEvent is part of the sealed OrderEvent class hierarchy, providing type-safe handling of order-related events
  • This event should be tracked when a user completes a purchase transaction
  • The event name must match the Event Name configured in the Marketing Cloud UI for proper tracking and triggering of actions
  • Uses the Order data class to encapsulate order details including line items, total value, and currency