mediumScenarioDesignMidSenior
A shopper adds items on their phone while logged out, then signs in on a laptop where they already had a cart. What should happen?
4 min readUpdated 2026-08-15
Answer
Short answer
You have two carts and no rule that is right for every case, so the merge has to be a deliberate product decision rather than whichever write lands last. Prices and stock have both moved since the older cart was created, which is the part that turns a session problem into a correctness one.
Was this answer helpful?
Likely follow-ups
- The price of an item in the old cart has gone up. What do you charge?
- Both carts contain the same product with different quantities. What is the result?
- How long should an anonymous cart live?
- Where is the cart stored, and does that change your answer?
Related questions
- A customer disputes their total and asks why. Can your system answer?hardAlso on pricing4 min
- Your promotions engine lets two discounts stack when it should not. How do you fix it and stop it recurring?hardAlso on pricing6 min
- Checkout calls pricing, tax, fraud, inventory and a session store. Which of those are you willing to carry on without, and what does the shopper see?hardAlso on checkout6 min
- Design the checkout flow for a marketplace with multiple sellers per order.hardAlso on checkout7 min