An E-commerce event for when a user replaces their shopping cart with a list of items.
Platform
Target Platform: androidJvm
SDK Version: 11.0.0
Available Since: 10.0.0
Description
The ReplaceCartEvent class represents a complete replacement of a user’s shopping cart contents. This event is triggered when the entire cart is replaced with a new set of items, as opposed to incrementally adding or removing individual items (which would use AddToCartEvent or RemoveFromCartEvent respectively).
ReplaceCartEvent extends the sealed class CartEvent, which provides cart-specific functionality for engagement events.
Sibling Classes
AddToCartEvent - Event for adding items to the cart
RemoveFromCartEvent - Event for removing items from the cart
Inherited Properties
From CartEvent
lineItems
1val lineItems: List<LineItem>
A list of line items associated with the cart event. Each LineItem represents a product or catalog object being replaced in the cart.
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 this engagement event.
Inherited Methods
From EngagementEvent
attributes()
1open override fun attributes(): Map<String, Any>
Returns: A map containing key-value pairs of event attributes.
Description: The Event attributes for this event.
name()
1open override fun name(): String
Returns: The event name as a String.
Description: 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.
Associated Types
LineItem
The lineItems property uses the LineItem data class to represent individual products in the cart.