Today’s blog post is a biggy!
One of the main features in Small Business Server 2011 is Sharepoint Foundation. Sharepoint allows you to manage documents and follow up on them. These files are kept in document libraries, while tasks for users are kept in lists. You can control the flow of these files and tasks with something called workflows. These workflows can be created using Sharepoint Designer 2010.
I decided to have a little fun with the designer. My goal was to create a simple helpdesk site.
The first thing you have to do in SBS 2011 is make sure that sharepoint is able to receive mail. This feature has not standard been configured by default. To enable it you can follow this blog post from the Official SBS Blog. Upon completing this task I created 2 mail-enabled security groups, HelpdeskOwners and HelpdeskTechnicians. In the HelpdeskOwners group I added the manager of the group, the HelpdeskTechnicians group I added the technicians.
In Sharepoint I created a new blank site. On this site I created two groups based upon the ones I created in the SBS Console. The HelpdeskOwners group has full control over the site, whilst the HelpdeskTechnicians only have Contribute rights on the site.
On the new site I created a new document library called Support Requests. This library is mail enabled and has the address ‘support@companyweb’. Be sure to keep a copy of the orignal mail. I also created an issue tracking list called ‘Support list’, it is set to send a mail when ownership has been changed.
Now we need to get mail from outside the network to the sharepoint document library. To do this I created a new user in the SBS console with an email address ‘support@domain.com’. In the Exchange Management Console I created a new contact called support with a default e-mail address ‘support@companyweb’. The mail flow settings of ‘support@domain.com’ were change to delived the mail directly to the contact.
What we’re going to do next is create a workflow for the mail enabled document library. There is however one issue. For security reasons workflows don’t start automatically when a mail is added to a document list. We can enable this with the following command in sharepoint powershell (run as administrator).
stsadm -o setproperty -pn declarativeworkflowautostartonemailenabled -pv true
Next I open up the sharepoint designer and connect to the new helpdesk site. The workflow is set to start when a new item is added to the library.

Next you may edit the workflow. I’ve added a screenshot of the layout in my workflow.

What the workflow basically does is this:
- Create a support ticket title which is saved in the Title field
- Create a new list item in the support list (this list has extra columns containing the mail address and a link to the original mail in the document library)
- Send an email to the Helpdesk Manager notifying him of the new ticket
- Send an email to the customer (you have to add a column to the document library for this. Make it a calculated column, by doing this we can filter the actual e-mail address from the ‘E-mail From’ field. Use the following formula to do this: =LEFT(RIGHT([E-Mail From],((LEN([E-Mail From])-FIND(“<”,[E-Mail From])))),LEN([E-Mail From])-FIND(“<”,[E-Mail From])-1) I found the formula to do this on this blog. This is basically an excel formula. I copy the value of this field to a field in the new list item created in the second task.
We also need to create a workflow on the tracking list. This workflow will notify the customer of a change to his support ticket.
Set this workflow to run when an item is changed.


This flow basically sends a mail to the customer whenever a value is changed (Ticket assigned to, ticket status, …).
Both lists look like this:



So there you have it. An afternoons work to create a simple helpdesk site (without previous knowledge of sharepoint designer), this without writing a single line of code. I believe this does demonstrate the power of sharepoint, even if it is just the basic foundation version.
Things get even better. You can lay-out workflows in visio and import them into the Sharepoint 2010 Designer. You can get a general insight on it by reading these two blog posts: