If you’re new to Microsoft Flow, Learn more about it at: https://flow.microsoft.com/en-us/
In this blog, I would like to show how we can make use of Microsoft Flow to notify the user(s) of low inventory of items in Dynamics 365 for Financials. This blog also demonstrates how to use Do-until loop in Microsoft Flow.
- An account on flow.microsoft.com
- Access to Dynamics 365 for Financials and publish Item List page as an OData web service (Ex: Items as the Service name)
- Connection to Dynamics 365 for Financials established in Microsoft Flow
Scenario: For the purpose of this blog, we’ll consider 10 as the threshold quantity. In Dynamics 365, when an existing item’s quantity on hand goes below 10, we’ll send an email notification to the user.
You can find all the Flow steps in the below image with comments on the right hand side:
Note: The Do until loop has options to edit limits. You can enter the Count (Default value is 60) and Timeout (Default value is PT1H which is 1 hour) by clicking on Change Limits.
In Dynamics 365 for Financials create a new Item and add 20 as Quantity in Hand /Inventory value.
When we modify the Inventory, the Flow gets triggered (If you choose an existing item which has inventory more than 10, then you can modify any field in the item record to trigger the flow). As the quantity of the Item is above 10, the condition in the trigger gets satisfied and the Do-until loop is activated. Depending on the Count and Timeout specified in Do-until loop, it keeps a check on the item’s inventory.
In Dynamics 365 for Financials, reduce the inventory of the item to any value below 10 by posting sales shipments, negative adjustments or by manually changing the quantity in hand.
when the quantity in hand/Inventory goes below 10, the Do until loop gets released and the subsequent actions get executed.
Finally the low stock warning email is sent to the user:
Learn more about loops in Microsoft Flow by visiting the following blog links: