The problem
The marketplace sold products from many vendors and held stock in more than one warehouse. Without clear rules for where each order should ship from, fulfilment was slow and the stock figures in Magento drifted from what was on the shelves.
What I did
- Set up Magento’s Multi-Source Inventory with a source for each warehouse.
- Wrote the routing algorithm: for each order it finds the vendors and warehouses that have the items in stock and chooses between them by location.
- Split an order into separate shipments when no single source could fulfil all of it.
- Kept stock in step across sources, so the same item was not sold twice.
The result
Orders are routed to a vendor and warehouse automatically as they come in, items ship from a location that has them, and inventory figures are more accurate.
Stack
Magento 2, Multi-Source Inventory (MSI), PHP, MySQL
I delivered this work as a senior engineer on the client’s project team.