Please enable JavaScript.
Coggle requires JavaScript to display documents.
Product has 20 quantity, Each order undergoes following activities
…
Product has 20 quantity
Consider 5 Resellers placing order
concurrently, each 10 quantity
-
-
-
-
-
Each order undergoes following activities
- Order details update
- Order status history update
- Inventory & Wallet update
Order details and Order status history are updated in MySQL DB.
And, to update the product inventory and wallet amount for concurrent orders, the order data are prepared and pushed to Queue, to prevent data loss
In App, we show that, order placed successfully, after data gets pushed to Queue in back end
Reseller placing order
Order processing
Checking Out Of Stock from UI, as well as on BackEnd
-
-
-
Here, Inventory Check is happening, before placing each order.
As Queue runs asynchronously, the updated inventory value won't be fetched.
Queue listens asynchronously (in background), whether the data existing in Queue. If data exists, it start updating the inventory and wallet for that order in DB.
-
-
-
-
-
-
-
-
Two Resellers placing order,
with quantity of 10, where the quantity of the product is 10.
Issue faced on Scenario II:
On concurrent order, with minimum quantity of product, the inventory goes negative.
Mitigation
During the approval of orders by Admin, the inventory will be verified for available quantity.
If inventory found negative (less than zero), a message will be shown to Admin, and admin can work with the wholesaler to increase the inventory quantity as inventory topup or admin can cancel the order. This will ensure the Order is captured from end user and at later stage Goodiee Admin can take a call to approve or disapprove the order.
Note: Currently Inventory Addition can be done by Editing the product by Wholesaler or Goodiee Admin