Skip to main content

system.kanoa.inventory.updatePartInventoryPolicy(partInventoryPolicyInfo, userId)

Updates an existing part inventory policy record, identified by partInventoryPolicyId, with new stocking and reorder rule values. Use this to adjust min/max/safety-stock quantities, the reorder point and reorder quantity, cycle-count frequency, or whether the part is actively stocked, without recreating the policy.


Parameters

partInventoryPolicyInfo Dictionary

- countFrequencyDaysInteger
- inventoryAssetIdInteger
- isStockedBoolean
- maxQtyFloat
- minQtyFloat
- partIdInteger
- partInventoryPolicyIdInteger
- reorderPointQtyFloat
- reorderQtyFloat
- safetyStockQtyFloat

userId Integer:Id of the user executing the function


Returns

# of records modified Integer
message String None if success


Example

partInventoryPolicyInfo = {
'partInventoryPolicyId': 733,
'partId': 8890,
'inventoryAssetId': 12,
'isStocked': True,
'minQty': 30.0,
'maxQty': 250.0,
'safetyStockQty': 20.0,
'reorderPointQty': 50.0,
'reorderQty': 125.0,
'countFrequencyDays': 60
}
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})

recordsModified, message = system.kanoa.inventory.updatePartInventoryPolicy(partInventoryPolicyInfo, userId)
print recordsModified, message