Power Automate Multilevel Approvals [Digital Purchase Order]

Recently, we have built a digital product using Power Automate where employees can request a product to purchase, and based on the price of the product, it will go through multiple approvals.

Once the approval is completed in every step, the employee will get notified about the product status.

It will go through below levels of approvals:

  • Team Lead
  • Manager
  • Finance Team, etc.

You can check the entire flow in the diagram below:

Digital Purchase Order Approval flow
Digital Purchase Order Approval flow

Here is how the Microsoft flow works:

  1. Employee Submitted a product request (on the SharePoint Online list).
  2. An approval request will be created for the Team lead. If the Team lead rejects, the flow stops there. And the employee will get notified via email.
  3. If the Team lead approves, then if the Price of the product is greater than $10,000, approval will be created for the Manager. If it is less than that, an approval request will be created the for Finance team.
  4. If the manager approves, then the flow will create the next approval request for the Finance team, and if it rejects, the flow will be stopped. And everyone will be notified via email.
  5. If the Finance team approved, the employee and the external vendor will get notified to purchase the product. And if the Finance team rejected it, then the flow stopped there and everyone will get notified.

Note: If the Finance team does not approve the request within 2 days, then it will automatically be approved.

The entire flow looks like the below:

Digital Purchase Order flow using Power Automate
Digital Purchase Order flow using Power Automate

To achieve this Follow the below steps:

Step:1

Let us first create a SharePoint online list having the below columns:

  • Employee ID = Default Title column
  • Employee Name = Person column
  • Employee Gender, Employee Role, and Employee Department = Choice columns
  • Product Name and Product Price = Lookup Columns
  • Product Quantity and Total Cost = Number type
  • Product Color and Approval Status = Choice type columns
  • Product Date = Date and Time type

The Screenshot below displays the Digital Purchase Order Approvals SharePoint list with the mentioned columns:

Digital Purchase Order list
Digital Purchase Order list

Step:2

  • Log in to Power Automate with your Microsoft credential, click on the +Create option and select Automated cloud flow, and Enter the Flow name.
  • Then select the flow trigger as When an item is created (SharePoint) and click on the create option as highlighted below:
Create automated cloud flow in Power Automate
Create automated cloud flow in Power Automate

Step:3

On the “When an item is created” flow action, provide the Site Address and List Name. Here I choose the list that I have created above “Digital Purchase Order Approvals“.

Configure SharePoint Site address and SharePoint List in Power Automate
Configure SharePoint Site address and SharePoint List in Power Automate

Step:4

  • We will calculate the Total cost value = Product price * Product Quantity and then we will Update the calculated Total Cost Value in SharePoint List Using Update item action from the action triggers.
  • For the Total cost column value, select the field and under Expression pass the below expression to multiply the price value with the product quantity. Click the ok or update option.
mul(int(triggerOutputs()?['body/Product_x0020_Name_x003a__x0020_/Value']),triggerOutputs()?['body/ProductQuantity'])
Update item in SharePoint list using Power Autoamate
Update items in the SharePoint list using Power Automate

Step:5

  • Now we will initialize a string variable named ‘VarOutcome‘ and we will use the initialized variable later in our flow to get the outcome of the value of the Finance Team and Manager.
  • So, click on the +New step -> select Initialize variable action. Then provide the Name of the variable and the type of the variable as String.
Intialize variable in Power Automate flow
Initialize variable in Power Automate flow

Step:6

Select +new step and add the “Start and wait for an approval” action specifying to start of a Team Lead approval process. This action has below fields:

  • Approval type: Select an approval type as “Approve/Reject – First to respond” from the drop-down.
  • Title: Enter the title field value from the Dynamic content.
  • Assigned to: Assign the email of the person who will approve/reject the requested product item.
  • Details: Enter the details to Team Lead for the requested product from the Dynamic content.
Approval action in Power Automate
Approval action in Power Automate

Step:7

  • Now we will add the Condition action to check whether the requested product is approved or not by the Team Lead.
  • In this Condition action, select the Outcome (from Start and wait for a Team Lead approval action) value equal to Approve.
add condition for Approval outcome value in Power Automate
add a condition for Approval outcome value in Power Automate

Step:8

  • From the condition, if the outcome is not equal to approve, the Team Lead rejects the requested product.
  • So here we will use the Update item action from action triggers to Update the Approval Status as Rejected in the SharePoint list.
Update Approval Status as Rejected using Power Autoamate
Update Approval Status as Rejected using Power Automate

And then we will email the requested employee using the Send Email action that the Product request has been declined.

Send Email to user using Power Automate
Send an Email to the user using Power Automate

Step:9

  • From the condition, if the outcome is equal to approve, then the Team Lead approves the requested product.
  • Now we have to check the condition using the condition action and if the Total Cost is less than or equal to $10000 then it goes to Finance Team for the second level of approval else it goes to the Manager team for approval.
int(outputs('Update_item')?['body/TotalCost'])
Condition for total cost value in Power Automate
Condition for total cost value in Power Automate

Step:10

  • If the condition matches it goes to the If yes section for the Finance Team for the Approval.
  • Select +new step and add the “Start and wait for an approval” action specifying to start of a Finance Team approval process for the Payment process for the employee-requested product. This action has below fields:
  • Approval type: Select an approval type as “Approve/Reject – First to respond” from the drop-down.
  • Title: Enter the title field value from the Dynamic content.
  • Assigned to: Assign the email of the person who will approve/reject the requested product item.
  • Details: Enter the details to Finance Team for the requested product from the Dynamic content.
Approval action in Power Automate flow
Approval action in Power Automate flow
  • If the Finance Team didn’t approve or reject the product request within two days it goes for an auto-approval. To set auto-approval select the More options icon (…) in the start and wait for an approval action.
  • Click on the setting gear icon and in the Timeout section, set the duration as PT2D and click Done as highlighted below:
Delay action for auto approval in Power Automate
Delay action for auto approval in Power Automate

Step:11

Now we will get the outcome of the finance team value, for that select the Set Variable action and select the initialized variable name (VarOutcome). In the value section pass the Outcome of the Finance Team.

set variable in power automate flow
set variable in power automate the flow

For Auto_Approval Select Set variable action More options (…)-> Configure run after -> and select the has timed out option as shown below:

Configure timed out in Digital Purchase Order flow
Configure timed out in Digital Purchase Order flow

Step:12

Now we will add Condition action, to check if the outcome of the finance team is either approve or null.

Condition to check outcome value in Power Automate
Condition to check outcome value in Power Automate

Step:13

  • If the condition matches then in if yes condition then we have to update the SharePoint list approval status as approved and send an email to the requested employee and also to the external user.
  • Here we will add an Update item action from action triggers to Update the Approval Status as Approved in the SharePoint list.
Update Approval Status as Approved using Power Autoamate
Update Approval Status as Approved using Power Automate
  • Now to send an email to the requested employee and the external user we will add a send email action, and in CC we will add the Team Lead and Manager to notify the requested product is delivered.
  • I have added the email, body, and subject using the dynamic content values here. And for the external user id, I have passed the email account value manually.
Send Email to external user using Power Automate
Send Emails to external users using Power Automate

Step:14

  • From the condition, if the outcome is not equal to approve, the Finance Team rejects the requested product.
  • So here we will use the Update item action from action triggers to Update the Approval Status as Rejected in the SharePoint list.
Update Approval Status as Rejected using Power Automate flow
Update Approval Status as Rejected using Power Automate flow

When it is rejected, we will email the requested employee using the Send Email action. Also in CC, we will add the Team Lead and Manager to notify them the requested product has been declined.

Send Email to user using the Power Automate flow
Send an Email to the user using the Power Automate flow

Step:15

  • For step 9, If the condition doesn’t match then it goes to the If No section, and approval will be created the for Manager.
  • Select +new step and add the “Start and wait for an approval” action specifying to start of a Manager approval process. This action has below fields:
  • Approval type: Select an approval type as “Approve/Reject – First to respond” from the drop-down.
  • Title: Enter the title field value from the Dynamic content.
  • Assigned to: Assign the email of the person who will approve/reject the requested product item.
  • Details: Enter the details to Manager for the requested product from the Dynamic content.
Manager approval process using Power Automate
Manager approval process using Power Automate

Step:16

Now we will get the outcome value of the Manager, using the Set Variable action and select the initialized variable name (VarOutcome). In the value section pass the Outcome of the Manager.

set variable in the power automate flow
set variable in the power automate the flow

Step:17

  • Now we will add the Condition action to check whether the requested product is approved or not by the Manager.
  • In this Condition action, we will check the variable that has an outcome of the manager value is equal to approve or not.
Power Automate flow Approval action
Power Automate flow Approval action

Step:18

  • From the condition, if the outcome is not equal to approve, the Manager rejects the requested product.
  • So here we will use the Update item action from action triggers to Update the Approval Status as Rejected in the SharePoint list.
Update Approval Status as Rejected using the Power Autoamate
Update Approval Status as Rejected using the Power Automate

When it is rejected, we will email the requested employee using the Send Email action. Also in CC, we will add the Team Lead to notify the requested product has been declined.

Update Approval Status as Rejected using the Power Automate flow
Update Approval Status as Rejected using the Power Automate flow

Step:19

For step 17, if the Manager approves the approval request, then it will create an approval for the Finance team. And you can just follow the For Finance team approval like above (from Step 10 to Step 14 ).

Step:20

  • Now our Digital Purchase Order Approval flow is ready. So we can save and test the flow.
  • To test the flow, select -> Manually -> Test
Test Power Automate flow example
Test Power Automate flow example

Create a new list item in a SharePoint list as below:

Power Automate trigger when an item is created
Power Automate trigger when an item is created

The team Lead will receive an email to approve or reject the product requested by the employee. Here we will test the Team lead Rejection flow, so the team lead will simply select the Reject option as highlighted below:

Power Automate flow rejection action
Power Automate flow rejection action

The below screenshot, below displays our Digital Purchase Order rejection flow ran successfully.

Digital Purchase Order flow ran successfully
Digital Purchase Order flow ran successfully

Now in the SharePoint list, we can see the requested item approval status has been updated as Rejected.

Update Approval Status as rejected using the Power Automate flow
Update Approval Status as rejected using the Power Automate flow

When the product request is rejected, the employee will get an email as below:

Send Email to user using Power Automate flow
Send an Email to a user using the Power Automate flow

Now, in the same way, we will create a new list item in the SharePoint list to test the Multilevel approval flow.

Power Automate flow trigger when an item is created
Power Automate flow trigger when an item is created

The team Lead will receive an email to approve or reject the product requested by the employee. Here we will test the Team lead Approval flow, so the team lead will simply select the Approval option as highlighted below:

Approval action in the Power Automate flow
Approval action in the Power Automate flow

The Second level of approval goes to the Finance team, they can either Approve or Reject. so here we will select an Approve option.

Multilevel approval in Power Automate flow
Multilevel approval in Power Automate flow

The below screenshot, below displays our Digital Purchase Order Approval flow ran successfully.

Digital Purchase Order approval flow ran successfully
The Digital Purchase Order approval flow ran successfully

Now in the SharePoint list, we can see the requested item approval status has been updated as Approved.

Update Approval Status as approved using the Power Automate flow
Update Approval Status as approved using the Power Automate flow

You can download the entire solution from here:

When the product request is approved, the employee will get an email as below:

Example of multilevel approval in Power Automate
Example of multilevel approval in Power Automate

You might also be interested in the following Power Automate tutorials:

Conclusion

In this Power Automate tutorial, we have shown how to create a digital purchase order with multilevel approvals using Power Automate cloud flow and the SharePoint Online list in a step-by-step approach.

We also explained the auto-approval mechanism, which occurs if the request is not answered within the specified timestamp. We also send an email to the employee whether the requested Product is Bought or Declined.

>