Microsoft Flow helps us to automate everything – from simple notifications to complex business processes with defined steps and stages. By using Approval process you can manage the approval decision of invoices, leads etc. from the higher level management in the organization.
In this blog, we are going to explore how to automate Quote Approval process in Dynamics 365 CRM using Microsoft Flow.
Let’s consider below example for approving the Quote created in Dynamics CRM using Microsoft flow:
When a sales person sends Quote for approval to manager by updating the field ‘Send for Approval’ to ‘yes’ then an approval email is sent to the manager for the same. If the manager approves Quote, then ‘Approved Status’ field on Quote record is updated as ‘Approved’ and an email is sent to sales person regarding the same.
Given below is the overview of flow that we are going to implement:
Following are the steps to implement the above scenario using Microsoft Flow:
1. Login to Microsoft flow and click on New —> Automated- From Blank as shown in below screenshot:
2. Add flow name and click on ‘Skip’ to create the flow from blank as shown in below screenshot:
3. Now add a CDS connector and choose action ‘Update a record’ and configure as shown below:
4. Next, check if the condition ‘Send for Approval’ field on Quote record of Dynamics 365 CRM is equal to true or not, as shown in below screenshot:
5. Now in Yes part of the flow add action as ‘Get Record’ of CDS connector and below this action add another same action to get the manger of user, as shown in below screenshot:
6. Search connector approval and select ‘Start and wait for the approval’ as shown in below screenshot:
7. Select and Add fields as shown in below screenshot:
Here, set Assigned To as email address of the manager.
8. Now let’s add a condition where we need to check outcome is equal to ‘Approve’ after we get approval response.
9. Depending upon the approval of manager we will send email to the owner of Quote regarding the process.
- In the true part of above condition add action as send email using outlook connector. Set To as ‘Email’ of the owner of quote in order to notify him that quote is approved.
- And below the above action add the ‘update the record’ action of Dynamics 365 CRM and update the approval Status as ‘Approved’ on quote record.
- In the false part of above condition add action as send email using outlook connector. Set To as ‘Email’ of the owner of quote in order to notify him that quote is rejected.
- And below the above action add the ‘update the record’ action of Dynamics 365 CRM and update the approval Status as ‘Rejected’ on quote record.
Now let us trigger the workflow by updating Send to Approval field on Quote record to ‘Yes’:
a. The flow is triggered and as you can see in below screenshot, the action ‘Start and wait for approval’ is in wait condition:
b. Now the manager will get below mail and when clicked on ‘Approve’ and then ‘Submit’ button, the flow will resume to perform next action:
c. Next, the owner of quote will receive a mail regarding approval of the quote and ‘Approval Status’ will be updated as ‘Approved’, as shown below:
Using the above Microsoft Flow we can configure and automate simple Quote approval process for Dynamics 365 CRM.