Purchase order not getting created by Stock Rules, Email is triggered with request number
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 09:27 PM
After Running the "Stock rule runner" scheduled job. Email got triggered but no purchase order got created. Procurement plugin is activated already.
selecting Restocking option as Vendor should create purchase order.
When selecting Restocking option as Parent stock room , it creates the Transfer order.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2022 06:56 PM
Is this question in context to HAMP? HAMP creates Hardware Inventory Stock Order requests, it doesn't cut a PO automatically.
Otherwise with no HAMP if com.snc.procurement plugin is active the system automatically creates a PO and POL.
Other common issues:
- Models need to be configured with status = In Production
- Models need to be published to the Service Catalog
- Vendor Catalog Item(s) defined for the models
- Verify the StockRules pending delivery value isn't set to true
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2022 06:55 AM
Hi Scott,
Thanks for your post - I am experiencing a similar issue and thought I would ask you for advice. We do not have HAMP. I have checked all of the items you have listed and validated that they are correct. I have an item that has an available quantity of 1, the stock rule is set to a threshold of 3 and an order size of 10 restocking from a parent stockroom. The parent stockroom has 3 available with a threshold of 3 and order size of 5 from the vendor. The stock rule runner job did not create a PO or TO for this item. I would have expected both to be created. In my mind it should have created a TO for 3 to restock the first stockroom partially, then the parent stockroom would need a PO created with an order size of 10 (3 for parent threshold and 7 for restocking). Can you think of any other items I can search to discover why the stock rule runner job is not creating the orders? Thanks. Stock rules below:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2022 09:17 PM
Great use case! I ran the script in debug to see what was happening, or said better what wasn't happening. The below code is from the _processStockroomStockrule method starting at line 40 of the script include called ProcessStockRules.
For your example stock = 3 and order = 10 so the if check returns false. The comments on line 9 below doesn't quite reflect what happens. Nothing happens! The system isn't smart enough to take what stock it can via transfer order and cut a PO to order the rest.
The rules will run once a day and once the parent stockroom get's 10 or more in stock the system will cut a transfer order.
1 2 3 4 5 6 7 8 9 |
if (stock >= order) { if (model.sys_class_name.toString() === this.CONS_MODEL || model.asset_tracking_strategy.toString() === this.TRACK_CONS) { this.transfer.consumableTransfer(parent, stockroom, model, order); } else { this.transfer.assetTransfer(parent, stockroom, model, order); } } // if it does not have enough, it will run each night until the parent stockroom has enough supply |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2022 06:57 AM
Thank you for the response and confirmation!