A Magento integration can take many shapes and forms. ERP integrations especially can get very complex. In this short post we’ll take a look at a small aspect of an inventory integration's implementation, namely dealing with stock deduction, keeping inventory levels accurate at all times and otherwise dealing with overselling or underselling.
The requirements of the example that we'll look at are simple; Magento's inventory, or more accurately, Magento MSI sources, are synced with warehouses inventory levels that come from an ERP. Whenever stock levels change in the ERP, Magento's sources are updated via the API — a one way sync from the ERP to Magento, keeping inventory levels accurate at all times.
When an order is placed on Magento, the ERP deducts stock within itself (The order is synced via another mechanism that we won’t get into.) The ERP stock level change triggers the ERP to notify Magento.
As stock …[Read more]