Domain: Cart¶
The Cart domain manages the shopping cart lifecycle: adding and removing items, applying quantities, selecting a fulfilment method and preparing the cart for checkout.
User Stories¶
-
Cart — User Stories
Add to cart and fulfillment method selection user stories.
Features¶
-
Cart Process
End-to-end flow of the shopping cart: adding products, updating quantities and converting the cart into an order.
Responsibilities¶
- Creating and maintaining a cart per session or authenticated customer.
- Adding, updating and removing product variants from the cart.
- Calculating cart totals based on current prices from the Price domain.
- Evaluating and exposing available fulfilment methods for the cart.
- Enforcing stock constraints from Microsoft Dynamics (ERP).
Entities¶
| Entity | Description |
|---|---|
Cart |
The active shopping cart for a customer or session. Contains one or more cart items and an optional selected fulfilment method. |
CartItem |
A single product variant in the cart, with a quantity and a resolved price at the moment of adding. |
CartFulfilmentMethod |
The fulfilment method selected for the cart (e.g. PostNL Standard, PostNL Evening). References the Fulfilment domain. |
Integrations¶
Microsoft Dynamics (ERP)
Stock availability is validated against Microsoft Dynamics when items are added to the cart and again at checkout. If stock is insufficient, the customer is notified before order placement.
See Stock Statuses & Orderability for the full set of blocking conditions that apply.
Business Rules¶
- A cart belongs to either an authenticated
Customeror an anonymous session. - Upon customer login, an anonymous cart is merged with the customer's existing cart.
- A
CartItemquantity may not exceed the available stock of that product variant. - At least one item must be in the cart to proceed to checkout.
- A fulfilment method must be selected before the customer can proceed to payment.
- Available fulfilment methods are determined by the Fulfilment domain based on cart contents (weight, dimensions, product type) and the delivery address.
- Cart prices are re-evaluated at checkout to reflect any price changes since the item was added.