cancel
Showing results for 
Search instead for 
Did you mean: 
sergeluca

Microsoft Flow : How to Escalate Approvals

Most approvals require an escalation if the approver doesn’t react on time.

 

I had to adapt one of my oldest flow  (an expense request flow that I created in 2016) to integrate the escalation process.

So basically the use case is classic : a user submit an expense in a SharePoint list, directly or via from PowerApps.

Then if the amount is < 500 euros, the expense is automatically approved, otherwise it must be approved. A discussion is therefore created in a specific Microsoft team channel, where members of the procurement department can start discussing the matter.

 

The Flow retrieves the user main manager (the one defined in Azure Active Directory), let’s call him the Big Boss, and the user line manager (stored in a SharePoint list, so to retrieve it I have to perform an OData query.

 

Then the line manager is asked to approve/reject the expense. He can take his decision based on the channel discussion. If the line manager doesn’t approve/reject within 2 days, the approval is escalated to the Big Boss and to the line Manager until one of them reacts.

 

Here is the high level view of my flow (click to have a bigger picture)

 

highlevelflow

 

 

But I will focus on the approval part :

 

 

highlevelflowapproval

 

How does the escalation work?

 

When I ask the Line Manager to approve (1st approval level), I define a 2 days timeout in the "Ask Line Manager to approve" action settings:

 

 

timeoutsetting

 

timeoutsetting2days

 

For the sake of the demo, I set it to 2 minutes : PT2M ( this is defined in ISO 8016).

After this action I add 2 scopes in parallel branches:

 

escalate2

 

In order to have the "escalate to Big Boss" action running when the timout is triggered, you just need to set the "Configure run after" :

escalate34png

to :

 

escalate5png

 

As you will notice the left branch is associated with a red arrow, which means that it will run only if the previous action ("Ask Line Manager to approve") fails; and it will fails if the line manager doesn't not react within 2 days (timeouts).

 

The right branch will run if everything is fine, which means if the line manager reacted on time.

Let's focus more on the Escalate to Big Boss scope  (2nd level of escalation):

 

escalate3

 

No mercy here : the Big Boss (main manager) or the Line Manager will have to react; the loop  (Do Until Main Manager reacts) runs until someone reacts.

 

Here again, I use the timeouts mechanism : every 2 days the Big boss or the Line Manager will be asked to react.

But there is also something else. The next action : "Checks if Expense has been approved".

 

escalate7

 

I wanted it to run after an escalation OR when the Line Manager reacted on time. So for both actions the settings must be :

escalate6png

 

Comments
Anonymous

How did you retrieve the Line Manager from the sharepoint list using Odata query?

Here is my list of managers

 

linemanagers.PNG

...and here is my code (including the Odata query) :

 

findlinemanagers.PNG

Kind regards

 

Serge Luca

Anonymous

Thanks!!

Anonymous

Hi Serge Luca,

I'm still new to Flow, I can see that you set a variable to the Find Line Manager scope, could it be "MainManagerReacts" variable, how did you add it? I can see that it can be assigned a value.

Or do you have a link to the first workflow you did in 2016.

 

Thanks in advance

regards,

Steven

Hello really new to flow here. I'm pretty good at modifying existing templates but starting from scratch I am off to a rough start, especially in trying to duplicate what you have here. I am curious if you could publish this as a template?  

About the Author
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • I am a Microsoft Business Applications MVP and a Senior Manager at EY. I am a technology enthusiast and problem solver. I work/speak/blog/Vlog on Microsoft technology, including Office 365, Power Apps, Power Automate, SharePoint, and Teams Etc. I am helping global clients on Power Platform adoption and empowering them with Power Platform possibilities, capabilities, and easiness. I am a leader of the Houston Power Platform User Group and Power Automate community superuser. I love traveling , exploring new places, and meeting people from different cultures.
  • Read more about me and my achievements at: https://ganeshsanapblogs.wordpress.com/about MCT | SharePoint, Microsoft 365 and Power Platform Consultant | Contributor on SharePoint StackExchange, MSFT Techcommunity
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • Founder of SKILLFUL SARDINE, a company focused on productivity and the Power Platform. You can find me on LinkedIn: https://linkedin.com/in/manueltgomes and twitter http://twitter.com/manueltgomes. I also write at https://www.manueltgomes.com, so if you want some Power Automate, SharePoint or Power Apps content I'm your guy 🙂
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 15 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • Big fan of Power Platform technologies and implemented many solutions.
  • Passionate #Programmer #SharePoint #SPFx #M365 #Power Platform| Microsoft MVP | SharePoint StackOverflow, Github, PnP contributor
  • Web site – https://kamdaryash.wordpress.com Youtube channel - https://www.youtube.com/channel/UCM149rFkLNgerSvgDVeYTZQ/