Back to all cases

02 / CASE STUDY

Order & inventory management

A clear record from the first order to dispatch.

Connect sales orders, stock reservations, approvals and warehouse dispatch in one workflow, with every order linked to its inventory movements and operation history.

Order workspace showing approval, dispatch and low-stock summaries, an order list and an inventory snapshot. MK-A01 has 120 units on hand, 96 available and 24 reserved.
Order states and inventory details share one workspace, with approval and dispatch actions available directly from each pending order. Interface shown in Chinese.

Project background

Sales records orders in a spreadsheet, warehouse staff reserves goods in another, and approvals arrive through chat. Quantity changes, cancellations and duplicate submissions can leave those records out of step. Teams repeatedly reconcile what is still available and which order each reservation belongs to.

This project uses the order as the shared record for sales and warehouse operations. Its state determines the next action, while the inventory ledger records each reservation, release and dispatch.

Following an order through to dispatch

In the workspace, order SO-26031 reserves 24 units of MK-A01 and awaits approval. The inventory snapshot shows 120 units on hand, 24 reserved and 96 available. Sales can see what remains available for the next order, while warehouse staff can trace the reservation to the order that created it.

  1. Create and reserve. Sales enters products and quantities. Submission checks available stock and links reservations to the order. If stock is insufficient, the workspace identifies the product and shortfall.
  2. Review the order. An approver checks the order in the pending queue. Approval moves it to awaiting dispatch; rejection or cancellation releases active reservations and records the reason.
  3. Dispatch the goods. Warehouse staff checks the approved products and quantities. Confirming dispatch converts the reservation into an inventory movement and updates the order.
  4. Trace and reconcile. Sales can follow an order into its stock movements, while warehouse staff can follow a product back to its related orders, operators and state changes.

Different roles, one shared workspace

  • Order workspace: filter by order number, product and state, process pending approvals and dispatch tasks, and export order records.
  • Inventory ledger: distinguish on-hand, reserved and available stock, with links to warehouses, products and orders, plus a dedicated low-stock view.
  • Approval and dispatch: actions follow the current order state, with review notes, cancellation reasons and dispatch records attached to the order.
  • Operation history: operators, timestamps, previous and new states, and related documents provide a clear path for investigating changes and discrepancies.

Keeping order state and inventory in step

Order state and stock reservations update in the same database transaction. Conditional stock checks prevent concurrent orders from reserving the same available units. Approval and dispatch endpoints validate the current state before accepting an operation.

Every inventory movement links to its business record and a unique request identifier. Repeated clicks or network retries return the original operation result. Cancellation and rejection release only active reservations, while dispatched orders retain their history and link to any subsequent business changes.

Technology: React / TypeScript / Node.js / NestJS / PostgreSQL / Redis

Handovers become part of the system

Sales sees the quantity available to promise, approvers see the orders requiring a decision, and warehouse staff receives approved dispatch tasks. Each role works along the same order record, with exceptions traceable to a specific transaction and a common data source for everyday coordination and reconciliation.