ShipOrderEvent is a concrete implementation of OrderEvent used to track when an order has been shipped in an e-commerce flow. It extends the sealed OrderEvent class, which is part of the engagement event system in the Salesforce Marketing Cloud SDK.
Properties
Inherited from OrderEvent
order
1val order: Order
A property that holds an Order object containing details about the shipment.
Inherited from EngagementEvent
category
1open override var category: Event.Category
The Event category Name. Category contains list of allowed values.
priority
1open override val priority: Priority
Defines the priority level for the event.
Methods
Inherited from EngagementEvent
attributes()
1open override fun attributes(): Map<String, Any>
The Event attributes for this event.
Returns:Map<String, Any> - A map of event attributes.
name()
1open override fun name(): String
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:String - The event name.
Related Types
Order
The Order data class contains the following properties:
1data class Order @JvmOverloads constructor(2 val id: String,3 val lineItems: List<LineItem> = listOf(),4 val totalValue: Double? = null,5 val currency: String? = null,6 val attributes: Map<String, Any> = mapOf()7)
Constructor Parameters:
id (String, required) - A unique identifier representing the order
lineItems (List<LineItem>, optional, default: listOf()) - A list of Line Item Data values
totalValue (Double?, optional, default: null) - The total value of the order
currency (String?, optional, default: null) - The currency of the total value for the order
attributes (Map<String, Any>, optional, default: mapOf()) - A map of user-supplied values
Companion Object
The OrderEvent class (parent of ShipOrderEvent) includes a companion object for factory methods or constants.
Related Events
Other OrderEvent subclasses available in the SDK:
PurchaseOrderEvent - For when a user makes a purchase
PreorderEvent - For preorder transactions
CancelOrderEvent - For order cancellations
DeliverOrderEvent - For order deliveries
ReturnOrderEvent - For order returns
ExchangeOrderEvent - For order exchanges
Usage Notes
The event name set via name() must match the Event Name configured in the Marketing Cloud UI for tracking to trigger any associated actions.
Use this event to track the shipment stage of an order in your e-commerce flow.
The Order object should contain the complete order details including line items and total value.