Tuesday, March 7, 2017

How to create SharePoint Designer 2013 workflow. SharePoint Designer workflow tutorial.

SharePoint Designer workflows are a great way to automate once-manual business processes.

For example, document approval process can involve physical movements of papers from department to department to validate the document with feedback, notes, and revisions. But this time-wasting manual process can be replaced with the SharePoint approval workflow. You have no need even to get up out of your chair!

In the previous article I described how to create SharePoint workflow, provided few examples of SharePoint workflows and highlighted the aspects of their usage. In this post I will demonstrate how to create a simple SharePoint Designer 2013 workflow, if you are new to this topic and want to understand the basics. Actually, this article is a short SharePoint Designer workflow tutorial with the focus on SharePoint approval workflow creation.
SharePoint Designer workflow tutorial 5
Before you begin, you must obviously have the installed SharePoint Designer connected to your SharePoint site. Then you should select or create a SharePoint list. I have created a custom list for the following use case:
  • Step 1: Requester creates a proposal for changes in the company policy and enters it in the SharePoint list.
  • Step 2: His request goes to CEO for approval as an email.
  • Step 3. CEO approves or rejects the request.
  • Step 4: Requester is noticed with email about the result. End of workflow.


SharePoint workflow


The same way you can use this workflow for any document approval, expense claims, time-sheet approvals, vacation approvals, invoice payment approvals, etc.

Now I will create and adjust a SharePoint 2013 workflow step by step.

How to create SharePoint Designer 2013 workflow

Select the site with created list on the start page of SharePoint Designer. 

Sharepoint Designer 2013 workflow

Choose “Workflows” in the left navigation panel.

Sharepoint Designer 2013 workflow 1

Then click on “List workflow” and select your list.

SharePoint workflow 1

On this step you should add new SharePoint Designer 2013 workflow to the list, enter its name and add description.

sharepoint designer workflow

Now you can start to build your workflow.

SharePoint workflow basics


You can add Conditions, Actions, Stages, Steps, and Loops to this workflow from the SharePoint Designer ribbon.

sharepoint designer workflow 1


You can also build workflow without clicking on ribbon. First at all, you can rename "Stage 1" to "Send approval" stage. All you have to do is click on "Stage 1" and rename it.

Then click "Start typing..." string and start typing, as it is expected, the Action name. We need to add "Set workflow status" action, you can select it from the "Action" dropdown on ribbon as well.

sharepoint designer workflow 3

SharePoint 2013 workflow actions


SharePoint workflow actions are individual functions (such as send email, update item, etc.) that execute as part of a workflow. You should notice that the range of available SharePoint workflow actions can be expanded with 270+ ready-to-use activities by Virto. These actions allow you to easily automate any business process in SharePoint without coding.

So, we have added "Set workflow status" action to the workflow. Now we should assign value to track the status of request in our list of policy changes. Just click on "this message" and type "Pending".

The next step is to specify the due date of request that will be sent from list. 

Firstly, we have to add the new variable "Due date". Click "Local variables" on ribbon, select "Add", type the name of new variable and select the Type "Date/Time". Save it.

sharepoint workflows


Now let's go back to our action. Double click on the orange line under the first action, and the new row is appeared.

sharepoint workflows 1
Select "Add time to date" action as in the previous example. Click on "date", then click on 3 dots. In this pop-up you can specify the date value.
sharepoint workflows 3

Select "current date" and change value 0 to 1 in Days in the action string.

And now we will use the variable "Due date" that we have created before. Expand the Variables and select the "Due date".

As a result, the Due date for each request from our policy changes list is one day after the request was created.

SharePoint workflow 1

Another action "Assign a task" should be added to select task participants.

SharePoint workflow 2

Click "this user" and define the values. Select list of participants that have to approve this request, type the title of task that will be assigned to the approver. Then assign Due date, using still the same custom variable.

SharePoint workflow 3

Now I`ll make the email message more informative. My approver must know what exactly he approves.

Open editor for body in the description. Then add 2 strings: title and description. Actually, my list contains only these two text fields. Now the letter will display these values of request.


SharePoint workflows 4

Let's take a look on other options. In email editor for task creation and overdue you can customize the email message. It is also possible to define the overdue email frequency. For example, daily, to surely make this request annoying.

SharePoint workflow 5

SharePoint workflow if else


On this step we must define the workflow behavior when the CEO approves or rejects the request.
From this point our SharePoint workflow can be ended in 2 ways. So let's add the "If" condition from the ribbon.
SharePoint workflow 6

Select the first variable "Outcome" and choose the value "Rejected". Then we should define the workflow action that triggers when the request is rejected. In the first place, we will set the workflow status to "Rejected" the same way as it was performed with "Pending" status action.

SharePoint workflow 7

SharePoint workflow email

Then we must inform the author of request about the fail. Select "Send an Email" action and assign the person who will receive this letter.

SharePoint workflows 5

Click in "these users" action and define users in email settings. We will send back the email to the user who has created current request.

SharePoint workflows 4

But what if a user have sent over 20 requests? We should specify which of them was ended. Add the lookup to the email body to display the title of this request.

SharePoint workflows 6

So what do we have as result.

SharePoint workflows 7

And now we must adjust the answer for an approved request. Let's add the resolution, using "Else Branch". This link on ribbon is grayed out, until you click on an existing conditional block.

sharepoint designer workflow 7

Add 2 SharePoint workflow actions of we have done before with Rejected request. The email should contain another message about approval, including congratulations.

how to create workflow in sharepoint

SharePoint workflow history

And finally, let's decorate out SharePoint Designer 2013 workflow with log reports for better tracking of its status.

Add the log action after each block and type the statuses.

how to create workflow in sharepoint 2

Now add the final stage to the bottom, select action "Go to a stage" and change its value to "End of workflow".

SharePoint Designer 2013 workflow 4

Ready. And the finishing touch. Click on created workflow in the left column and define its start options. Our workflow will be started when a new request is added to list.

SharePoint Designer 2013 workflow 5

Don't forget to save and publish your workflow from the ribbon of SharePoint Designer.

Of course, a test should be arranged. Go back to the requests list and add a new request. I`m in mood to claim a reward for this article. I'll add a new request to task list. It became "Pending" status, as our SharePoint workflow has started.

SharePoint Designer 2013 workflow 6

Click on "Pending" status to see the workflow details. As you can see, the approval task is assigned to CEO, and you can track all changes of your request. Or you can wait for a result message to your email box.

SharePoint Designer 2013 workflow 8

So we have created a SharePoint 2013 workflow step by step. Similar way you can customize your own SharePoint Designer workflows to automate your business processes. The trick is to have a wide range of workflow actions to avoid custom coding.

Virto SharePoint workflow activities kit allows you to use over 270+ actions to increase the efficiency in your company. You can learn more about this kit on our site and view the list of all available SharePoint Designer workflows extended by Virto.