Lazy Approvals for Dynamics 365 using Microsoft Flow
Lazy Approvals for
Dynamics 365 using Microsoft Flow
I got a business
requirement in Dynamics 365, where if Opportunity discount % is greater
than equal to 5, send an email to defined approver and get it approved on email only. This is to pace up the approval process without asking managers or Sr. Leaders to login to system.
This was not possible
earlier in Dynamics 365 however I have seen it happening in SharePoint using
Nintex workflows.
This is now possible
using Approvals in Microsoft Flow. Following is the solution and approach
with pre-requisites.
I
had setup of the following environments with licenses appropriately.
a. Microsoft Dynamics 365
b. Microsoft Flow
c. Microsoft Outlook – exchange license
Approach :
Create following fields on Opportunity.
i. Discount % - Whole Number
ii. Approval status ( Option set with 3 values ie.
Pending, Approved and Rejected).
iii. Is email sent for approval? – Two Option
Create a new MS Flow
on Dynamics 365 Opportunity update.
Add condition if
Discount% is greater than or equal to 5, then check approval status should not
be approved.
If condition is
satisfied, Start Approval, as per the snapshot below.
Provide some
details of the Opportunity in the email body or subject so that Approver can identify it from email itself. Once the user approves or rejects the opportunity, capture the
response as Outcome with the comments in Dynamics 365.
Please note for approval
response value in while capturing response will be Approve and Reject
respectively.
If response is Approve,
Update the opportunity record and set the correct values in respective fields as
per the image below.
I have observed that
flow triggered multiple times even after condition is failed. So to avoid that
I have added one more condition just above start approval that If email is sent
or not.
Cheers,
Javed Nehal Jamali
Comments
Post a Comment