Skip to main content

Cart

What it does: Manages what the customer has selected β€” items, quantities, rewards, and promos β€” before they proceed to checkout.

Why it matters: Cart integrity is critical to revenue. Pricing errors in the cart, lost cart state, or failed promo applications directly cause abandoned orders.


Feature Table​

FeatureProblem It SolvesWhat It DoesHow It WorksDependenciesPrerequisitesLimitationsImpacted Metrics
Add Item to CartCustomer wants to start an orderAdds a menu item (with chosen modifiers) to the cartByte Helium sends add-line request to Cart Service; price is calculated by backend at add timeCart Service, Menu ServiceLocalisation and order mode setCart tied to session; guest carts lost if session expiresAdd-to-cart rate
Update / Remove Cart LineCustomer changes their mindUpdates quantity or removes an item from the cartCart Service update/remove line call; totals recalculatedCart ServiceItem must be in cartReal-time repricing may surface price changesCart modification rate
Apply Promo CodeCustomer has a promo codeValidates and attaches a promo code to the cart for a discountByte Helium sends promo code to Cart/Promo service; eligibility validated server-side; cart repricedCart Service, Promo EngineCart must have items; promo must be valid for marketInvalid code returns error (400) but keeps cart intact; one promo code at a time (market config)Promo redemption rate, discount rate
Add Reward to CartLoyalty member wants to use a rewardAttaches a loyalty reward to the cart (e.g., free item)Reward validated with Loyalty service; reward token attached to cartLoyalty service, Cart ServiceCustomer must be signed in and enrolled in LoyaltyReward must not be expired; only one reward type per cart (market config)Reward attach rate
Remove Reward from CartCustomer changes their mind about a rewardDetaches the reward from the cartLoyalty service reward removed; cart totals updatedLoyalty service, Cart ServiceReward must be in cartReward returns to available balanceCart modification rate

Technical Sources​

πŸ“Ž Technical Source: Add Item to Cart / Apply Promo
  • FRD References: FRD-HEL-011, FRD-HEL-048
  • TRD Domain: Cart
  • Key Interfaces / APIs: Add/Update/Remove Line (App β†’ Cart), Apply/Remove Promo (App β†’ Cart)
  • Data Contracts: Cart (id, lines[], totals, benefits[]) β€” idempotent ops
  • Source Summary:
    • All cart operations are idempotent (safe to retry)
    • Pricing correctness: 100% accuracy required (enforced via golden tests in backend)
    • Invalid promo (400): error shown, cart state preserved
    • Cart API: additive changes only, 90-day deprecation window
    • Promo eligibility is always server-side β€” never computed in Byte Helium

See it in the wiki