Tim is a Senior Consultant at ThreeWill. He has 15 years of consulting experience designing and developing browser-based solutions using Microsoft technologies. Experience over the last 8 years has focused on the design and implementation of SharePoint Intranets, Extranets and Public Sites.
SharePoint Approval Workflows
In the first blog of this series, I suggested that most users of SharePoint do not understand the full potential of the platform due to a lack of training. Several areas that I mentioned being underutilized included:
- Custom Lists
- Notifications and Workflow
In the second blog, I focused on some of the powerful benefits that could be experienced by creating and using Custom Lists in SharePoint to manage list data. We walked through the process of creating a custom list to capture New Employee On-boarding activities and demonstrated the powerful sorting and filtering capabilities provided by SharePoint to make this data more useful.
In the third blog of the series, I discussed the ability to configure alerts on list items so that Managers could be notified when employees they manage were updated in the Employee On-boarding list.
In this fourth blog of the series, I’d like to focus on more complex notifications and Approval Workflows that can be configured using SharePoint Designer.
In many cases, the List Alerts described in part III of this series provide everything that is needed to support a simple business process. However there may be other business process scenarios where a more advanced notification is necessary. Welcome to SharePoint Designer. SharePoint Designer is a SharePoint Power User tool that can be used to create powerful workflows using a visual designer. First of all, SharePoint Designer workflows can be configured to run automatically (when a list item is added, updated or deleted) and/or they can be configured to be started manually by a user. Once the workflow begins execution, simple or even complex logic can be executed to determine process-appropriate activities that should be performed on the related list item or document. While there are many different activities that a SharePoint Designer workflow can perform including copying data from one list to another, I’d like to focus in this blog on the activities pertaining to notifications. In particular, I’d like to focus on the “Send an Email” and the “Start Approval Process” activities.
Send an Email
To demonstrate the “Send an Email” workflow activity, I’m going to create a simple workflow called “Notify Manager” which, in this case, will send an email to the person defined in the Manager column of the Employee On-boarding list. I’m going to configure this workflow to run any time a list item is updated.
Send an Email, as the name suggests, is a simple activity to send an email. The person, or list of people to whom the email is sent, can either be hard-coded where the value is always the same or dynamic in cases where logic needs to be applied to determine who should receive the email. In this example, the recipient of the email will come from the Person selected in the Manager column. The Subject and Body of the email can be static, dynamic or even a combination of the two. Notice in the example below that the Subject is hard-coded, but the Body of the email contains a combination of static text as well as dynamic values from the list item that was updated (i.e. First Name, Last Name).
The net result is that Managers will receive a customized email each time one of the Employees they manage is updated. This could easily be made more sophisticated by adding conditional logic where the email is only sent when specific columns are updated.
Next, let’s discuss the power of adding a workflow that contains a “Start Approval Process” activity.
In some business process scenarios, you want to receive feedback from someone within the process to ensure they have completed their tasks. The “Start Approval Process” activity within SharePoint designer kicks off an Approval Process involving one or many individuals. What makes the Approval Process different from merely sending an email is that a SharePoint task is created and assigned to a person or persons in addition to them receiving an email. If more than one person is required for Approval, the Approval Process can be configured as “parallel” where all approvers receive their Approval task request at the same time or “serial” where the second approver only receives their Approval request after the first person has responded to their Approval Task.
In the case of the Employee On-boarding scenario, I want to define Approval Workflows for each of the main activities associated to employee on-boarding: desk assignment, computer provisioning, employee orientation and benefit enrollment. I will configure these Approval Workflows to all kick-off when a new employee is added to the Employee On-boarding list. To show some of the power of SharePoint Designer workflows, I am not going to hard-code the people who will be involved in the different Approval processes. Instead, I am going to create a very simple custom list that has two columns: Approval Category and Approval Person as shown below:
Now, I can configure the various Approval Workflows to do a look-up to this table to determine the person who will be doing the approval. This will allow me to change Approvers over time by updating the Approval person in this SharePoint list instead of changing the workflow. This would enable someone who doesn’t have SharePoint Designer Workflow experience to change the behavior of the workflow by updating a SharePoint list value.
Below is an example of a SharePoint Designer workflow called Computer Approval. I will configure this workflow to run when a new item (i.e. Employee) is added to the Employee On-boarding list. I will also configure it so the workflow can be started manually in case the person responsible for completing the Approval task “rejects” or chooses the “Unfulfilled” button when it runs the first time when the employee is first added to the list. As you can see, the workflow is very simple…single workflow activity. However, the Start Approval Process has a number of different configuration points where emails can be customized and additional functionality can be configured. For this scenario, I am going to customize the email that is sent to the Approver or the person responsible for acquiring and provisioning a computer for the new employee. I am also going to customize the Task form where the Approver will respond by either clicking a “Completed” button or “Unfulfilled” button indicating that the computer was provisioned successfully or whether there was an issue that prevented the computer provisioning.
The screen shot below demonstrates the customization of the Approval email that goes out to the person who will provision the Computer. Each approver, in our scenario only one person, will receive an email and will also be assigned an associated Task in a task list.
Once an Approver receives this email, they would do the work that is necessary to fulfill the request. In the case of the computer provisioner, they would be responsible for acquiring the appropriate computer for the new employee and delivering it to the employee. Once this is completed, they should update the task to mark it “Completed.” If there was a problem or is an outstanding question related to the request, they could enter any questions in the comments area of the Task Approval form and choose the “Unfulfilled” button. In either scenario, an email will be sent to the Manager indicating either the fulfillment of the Computer provisioning or indicating the request is Unfulfilled plus the associated comments indicating why the request couldn’t be fulfilled. In the scenario where the Task is marked “Completed,” I have configured the workflow to update the Computer Received column to a value of “Yes” in the Employee On-boarding list.
Below is an example email that an Approver would receive. Note that the Outlook Client automatically creates a handy button to allow the recipient of the email to click the button to open the Approval Task so they can easily respond to the task.
When the approver clicks the “Open this Task” button, the task screen below is presented to the Approver allowing them to indicate whether the request is Completed or Unfulfilled. If Unfulfilled, they can add comments indicating the reason which will be sent back to the Manager.
Note there is also a Due Date field that can be configured as part of the request. If the Approval process had been configured to include a “due date,” this field would be populated with a date indicating when the task was due. If the task is not completed by the Due Date, a follow-up email is sent to the Approver indicating the task is overdue.
If the “Completed” button is selected, the Approval process ends with the Employee On-boarding list being updated to indicate that the Computer has been delivered and an email is sent to the Manager as shown below:
If the “Unfulfilled” button is selected, the Manager receives an email indicating the request was NOT completed along with the comments from the Approver. Once any outstanding questions/issues are resolved, the Manager can restart the workflow manually so that the Computer request can be fulfilled.
In this simple scenario, the Approval Process was used to request provisioning of a Computer and the Employee On-boarding list item was updated as part of the Approval process. In addition, the Employee Manager was notified of the outcome of the computer Provisioning request.
I’m sure you can imagine other business processes where someone needs to be brought into a business process at a certain point in time to either perform some activity or maybe even to provide some relevant data. A SharePoint Designer workflow leveraging the Start Approval Process activity is a relatively easy way to automate this process. Missed deadlines due to someone forgetting to send an email are now replaced with immediate communication using the Approval email and reminders when a task is not completed based upon the defined task due date. Business processes such as the processing of Purchase Orders can have a rather severe consequence if dates are missed and additional interest charges are applied. Or even worse, business might be lost if a sales opportunity falls through the cracks. These and many other business processes can be supported and tracked leveraging out of box (OOB) SharePoint functionality like alerts and workflows.