On most ecommerce websites, the user has the ability to change the number of products at the last step of the order.
Question: How to update quantity of order items by using ADD, CONFIRM, CHECKOUT workflow?
Example:
- User add 1 product to order (send ADD event with
"quantity": 1
): - User changes product quantity to 5 (before checkout):
- Is expected that the
quantity
value can be changed in CONFIRM event, but it does not supportquantity
parameter, it only hasproduct.item_id
parameter (that is useful if user removes some items from cart).
If we don`t update quantity, and send CONFIRM + CHECHOUT events after step.2 we will get 1 item in order instead of 5:
Solutions that I know:
- send additional ADD event with updated
quantity
field (but then there is no point in the original/first ADD event, and it is not clear when to trigger it to avoid many duplicates in CDP); - use ORDER_CHECKOUT event (but then it makes no sense at all in the chain of ADD, CONFIRM, CHECKOUT events).
What is the best pratice to resolve this issue?