Skip to main content

Update Cart Item Body

updateCartItemBody represents a payload of the cart item update event. The purpose of this payload is to inform the partner when a customer selects, updates, or removes a product from the Rokt placement so the changes can be reflected in the customer cart.



cartItem: CartItem | null

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: 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?