
π Retail & E-commerce Β· Data Flow
How stock stays in sync across stores, warehouses and marketplaces so the same item isn't sold twice.
Drawing diagramβ¦
Data flow for omnichannel inventory: store POS sales, warehouse receipts and dispatches, online orders and returns all send stock events to a central inventory service, which updates stock per SKU per location, calculates available-to-promise minus a safety buffer, and pushes it to the website, the mobile app and marketplaces (Amazon, Flipkart). Low stock triggers replenishment orders to suppliers.
flowchart LR POS[Store POS] -->|Sales, returns| INV[Inventory Service] WMS[Warehouse System] -->|Receipts, dispatches| INV WEB[Online Orders] -->|Reservations| INV INV -->|Stock per SKU per location| DB[(Inventory DB)] DB -->|Available minus safety buffer| ATP[Available-to-Promise] ATP -->|Stock levels| SITE[Website and App] ATP -->|Stock feed| MP[Marketplaces] DB -->|Below reorder point| REP[Replenishment] REP -->|Purchase orders| SUP[Suppliers]
An online store split into microservices: catalog, cart, orders, payments and search, with Kafka events connecting them to shipping and notifications.
What happens when a shopper clicks Pay: stock is reserved, the payment is authorised, the order is created and stock is released again if payment fails.
Every status an online order moves through, from placed to delivered, including cancellations, returns and refunds.
A flexible product catalog: categories, products with variants (size, colour), prices, stock per warehouse and images.
How an online store handles a return: eligibility, pickup, quality check at the warehouse and the refund or replacement.
How an online store builds 'recommended for you' and 'frequently bought together': click and order data, model training and a fast serving layer.