Two Level SharePoint Designer Workflow In SharePoint Online

In this article, we will see how can we create a two-level approval workflow in SharePoint Designer 2013 workflows.

Let's understand the process first,

The process starts by the initiator, who can apply for a request by entering some details which triggers an email to the approver automatically by notifying them to take action on the pending task. The approver can review it and verify all the details which were submitted by the initiator by clicking on the link that is provided in the same mail trail. If he wants to approve it, he can simply click approve button else if he wants to reject then he can click on the Reject button. 

If Approver rejects the request then the request doesn’t process for further Approval and the requestor will get a notification mail in which notifying that your request is rejected. But if the request is approved by the first-level approver then the second-level approver receives an approval mail with the same details that were submitted by the initiator and he can take any action by clicking Approve & Reject button. An approver action notification will be sent to the initiator.

Let’s start and create a custom list named "DemoList". The following columns need to be created- Employee Name, 1stManager, 2ndManager, Start Date, End Date, Leave Type, etc. Now open your SharePoint Designer & click List Workflow and choose your list.

Two level SharePoint Designer Workflow in SharePoint Online

After the naming of the workflow & Select SharePoint 2010 or Select SharePoint 2013 Workflow. And click the ok button.

Two level SharePoint Designer Workflow in SharePoint Online

Kindly select "Find Manager of current user" Action.

Two Level SharePoint Designer Workflow In SharePoint Online 
Two Level SharePoint Designer Workflow In SharePoint Online

Click on this user and select Current Item & Created by & in the output select variable 1stManager.

Two Level SharePoint Designer Workflow In SharePoint Online 

Same as the previous step again select "Find Manager of current user" Action. Now choose the 1stManager variable and in output 2ndManager as shown in the figure.

Two Level SharePoint Designer Workflow In SharePoint Online 

 Select "Log to in the history list" action. This will be useful for troubleshooting or debugging purposes.

Two Level SharePoint Designer Workflow In SharePoint Online 

Now Select Action "Start Approval Process on Current list with users".

Select the user whom you want to assign the task, and select variable manager1st as here we want to assign the task to the manager. After setting the user in that respective variable which will be shown in the below images.

Note
I will suggest you assign task to a user who is available in your tenant as we can't assign task outside the domain

Two Level SharePoint Designer Workflow In SharePoint Online 

Click on Approval (approver) which will redirect to a new window which is given below

Two Level SharePoint Designer Workflow In SharePoint Online 

Click on Change single task Behavior.

Two Level SharePoint Designer Workflow In SharePoint Online 

Select set workflow variable action in both places as shown above.

Two Level SharePoint Designer Workflow In SharePoint Online 

Set to yes in the upper one and set No to in a lower step which leads to the status of the workflow.

Two Level SharePoint Designer Workflow In SharePoint Online 

Now Log it to the history for logs.

Two Level SharePoint Designer Workflow In SharePoint Online 

Now select action If value equal value & click on value

Two Level SharePoint Designer Workflow In SharePoint Online 

In the data source, Select Variables & parameters, and in Filed Source to IsItemApproved

Two Level SharePoint Designer Workflow In SharePoint Online 

Now click on values and make the value yes after that click ok button.

Two Level SharePoint Designer Workflow In SharePoint Online 

Choose action Start Approval Process same as the earlier step, current item and user to whom you want to assign the task. Here we will 2ndManager variable.

I will suggest you to assign the task to a user who is available in your tenant.

Two Level SharePoint Designer Workflow In SharePoint Online 
Two Level SharePoint Designer Workflow In SharePoint Online 

Now we log the message to the workflow history and click on ok button.

Two Level SharePoint Designer Workflow In SharePoint Online 

Now Triggered the workflow manually and automatically or when the item is updated as per your requirements.

Two Level SharePoint Designer Workflow In SharePoint Online 

After that make a step and named it Workflow Ends. Select action Stop the Workflow and log it Workflow Ends at this Step.

Two Level SharePoint Designer Workflow In SharePoint Online 

Last but not least publish the workflow.

Now we will check our Workflow and output example is given below,

Two Level SharePoint Designer Workflow In SharePoint Online 

Go into the list and add a new item in the list.

Two Level SharePoint Designer Workflow In SharePoint Online 

Approver gets a mail like this, in which he has to click on Review "Regarding Leave on 28th of January".

Two Level SharePoint Designer Workflow In SharePoint Online 

User can Accept or Reject the request.

Two Level SharePoint Designer Workflow In SharePoint Online

This is the out-of-the-box mail format that the user will receive when the approver will take any action on his request. We can also change the mail body.