Skip to main content

Update CartItem Placement Message Body

Overview

Update CartItem Placement Message Body represents a payload of the cart item update message. The purpose of this payload is to inform the Rokt placement when a customer selects, updates, or removes a product from the partner's cart. This way the changes can be reflected in the Rokt placement.

Properties

cartItem

cartItem: *CartItem Represents the current state of the cartItem.

If a customer adds an item, cartItem contains the product details. If a customer removes a previously selected item from their cart, cartItem is null, and the previous product details can be found in oldCartItem.


oldCartItem

oldCartItem: CartItem | null Represents the previous state of the cartItem property.

oldCartItem allows partners to reference the previous value of cartItem to understand what properties have changed.

If an item has only been added, and not updated or removed, oldCartItem will be null because there is no previous value.

Was this article helpful?