Auto-stop Sales Order if Stock Level is Low, Depleted or for Recall purpose?

Hi everyone,

How can I set an auto-stop Sales Order rule if a particular stock level is low or depleted?

Use case:

  • “While stock lasts” free gifts when customer makes purchases. Let’s say I have only 100 units of the free gifts, ERPNext will automatically stop any Sales Order of the free gift item once the stock level reaches zero. I understand that the Sales Person can see the stock level of the item in the Sales Order but sales people might overlooked it. Hence having this auto-stop feature or any workarounds would be great.

Another scenario to drive this point home is product defect that needed to be recalled and to be stopped from selling immediately.