1

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:

  1. User add 1 product to order (send ADD event with "quantity": 1 ):enter image description here
  2. User changes product quantity to 5 (before checkout):

enter image description here

  1. Is expected that the quantity value can be changed in CONFIRM event, but it does not support quantity parameter, it only has product.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: enter image description here

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?

1 Answer 1

0

You can send CLEAR_CART and ORDER_CHECKOUT on any change in quantity, to avoid duplication. A normal flow would follow in case of no change.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.