Shopping Cart Microservice
Template:
When <circumstance>, $actor wants to <motivation> so that they <goal>
- When shopper finds an item they like, they want to add it to a cart so that they can later buy it
- When shopper changes their mind about buying an item in a cart, they want to remove it from the cart so that they can avoind buying it
- When shopper decides where to ship items in their cart, they want to update shipping information so that purchase can be shipped to the correct address
- When shopper changes their mind about where to ship the purchase, they want to remove shipping information so that the items don't get shipped to the wrong address, and so that they can later add the correct shipping information
- When shopper decides how to pay for the items in their cart, they want to update payment information so that correct payment instrument gets charged
- When shopper changes their mind about how to pay for the items in their cart, they want to update shipping information so that wrong payment instrument doesn't get charged
- When shopper is ready to finalize their purchase, they want to click "purchase now" button so that they can finalize the purchase and eventually receive the items purchased.
- Add item to cart
- Inputs: customer_id, product_id, product_customizations
- Response:
cart_id
- guid of the cartcart_item_id
- guid of the item in the cart
- Expected result: product with indicated customizations (e.g. color) added to the cart
- Remove item from cart
- Inputs:
customer_id
orcart_id
(we are assuming a customer only has one cart at any given time, across any device/session).cart_item_id
- guid of the item in the cart
- Response: success or error
- Expected result: product removed from the cart
- Inputs: