Unique thresholds for items in inventory, send email when below threshold

I am working off of the Simple Inventory base. I see that in the base code it has an expression condition that says [ITEM ID].[Total Stock Available] < 25 before sending an alert for low inventory. Great, perfect. This, however, applies to ALL items when the Total Stock Available is less than 25.

I want to set thresholds on an item-by-item basis. For example, item-001 I want to have an inventory threshold of 300, while item-002 I want to have a threshold of 30. I know I change the number (< 25 in the example above) at the end of the expression to do that...but...

What would the expression be to pull the Total Stock Available for a specific item within the Item ID column? Would I need to set up alerts for each item or is there an easier way?

Solved Solved
0 1 141
1 ACCEPTED SOLUTION

If I'm understanding correctly the scenario. You would need of course a [threshold] column in your ITEMs Table. 

Then set a bot to trigger  whenever the stock could change, for example "Rows added to the StockEntries Table". The condition for this bot to trigger would be This bot could run a [ITEM ID].[Total Stock Available] < [ITEM ID].[threshold]

If you just need the notification you can send the notification from this bot, using the [ITEM ID] ref. If you need any specific action from the ITEMs Table then you need to run an action of type "Run an action in a set of rows", the sows selectec would be SELECT(ITEMS[ID],[ID]=[_THISROW].[ITEM ID]) and from then just run any action.

View solution in original post

1 REPLY 1

If I'm understanding correctly the scenario. You would need of course a [threshold] column in your ITEMs Table. 

Then set a bot to trigger  whenever the stock could change, for example "Rows added to the StockEntries Table". The condition for this bot to trigger would be This bot could run a [ITEM ID].[Total Stock Available] < [ITEM ID].[threshold]

If you just need the notification you can send the notification from this bot, using the [ITEM ID] ref. If you need any specific action from the ITEMs Table then you need to run an action of type "Run an action in a set of rows", the sows selectec would be SELECT(ITEMS[ID],[ID]=[_THISROW].[ITEM ID]) and from then just run any action.

Top Labels in this Space