Currently, we are using Magento 2 with ERP(Oracle for inventory and Logistic) when any stock in/out we are sending through API to Magento for the STOCK update.

Due to the high volume of order, we can’t push all order to ERP on real time so we are running a cron job every 2 Min to push order to ERP and get back STOCK quantity and update on Magento.

In between any inventory update, we are updating in Magento, any cancellation updating Magento.

Due to the time delay, we are facing OVER SALE?


[![enter image description here][1]][1]

When the last order will go till that the product will be in stock on web but when order will reach to ERP we get to know stock is 0 so we are getting over SALE

Is there any solution to overcome this?


You could flag all orders that have been sent to the ERP (update a custom attribute against an order). This allows you to track orders that Magento knows about, but the ERP doesn't.

Then override / extend the stock update API call and instead of updating/returning the product stock level, return the stock level minus all allocated stock in orders that haven't been sent to the ERP?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.