Incident Resolution Satisfaction Surveys on SharePoint
Published Feb 15 2019 01:42 AM 1,497 Views
First published on TECHNET on Dec 08, 2009

A key measurement of incident management is customer satisfaction.  Typically customer satisfaction is measured using a survey which captures the customer’s satisfaction with the timeliness of the resolution, the resolution itself, and the attitude of the IT person providing the service.  In a typical incident management workflow the affected user of an incident is emailed a link to fill out a survey when the incident is closed.  The user’s response should be able to correlate back to the incident and the analyst resolving the incident.


In Service Manager 2010, we decided not to implement an in-box solution for surveys because there are many other existing survey platforms out there which customers could use.  Instead of spending time on reinventing the wheel we invested the time in other areas like deep integration with System Center products.


Since this capability is obviously important, I wanted to share with you how to set up surveys to work with Service Manager.  SharePoint is a very flexible platform and has an out-of-box capability to manage surveys. In this blog post I’ll show you how to set up a simple customer satisfaction survey on SharePoint, how to link to that SharePoint survey from an email, and pass information about the incident ID and analyst to the survey seamlessly.


First – make sure you have a Windows SharePoint Services 3.0 (WSS) or SharePoint Portal Server 2007 (SPS 2007) site set up somewhere.  I used Windows SharePoint Services to set this up.  The survey functionality is essentially the same between these two versions of SharePoint.  WSS is a free download from Microsoft that can install on Windows Server 2003, 2008, or 2008 R2.


The next step is to create a new Survey on your SharePoint site.  To do this, log into your SharePoint site as a SharePoint administrator.  Click on Site Actions to get the menu and then click on Create:



On the next page, click Survey under Tracking:



Fill in a Name and Description (optional). Make sure you set Allow Multiple Responses to Yes .





Click Next and you’ll be at the first screen where you can enter survey questions.  Enter IncidentID as the first Question and select ‘Single line of text’.



Leave everything else the same and click Next Question.


For the second question, repeat as above but call the question ‘Analyst’.




Now repeat the cycle of adding as many questions as you like until you are done adding questions and click Finish.  When you click Finish SharePoint will take you to a page that looks like this:



Click on Advanced Settings.


On the Advanced Settings page set Read Access to ‘Only their own’ since we don’t want users reading each others survey results.  Set Edit Access to ‘None’ since we don’t want users changing their surveys after they are submitted.  Administrators and users with the Manage Lists permission on this survey will be able to read and edit all survey results if necessary.  Leave Search = Yes if you want the admins to be able to search the survey results.  Click OK when you are done.



You can get more fancy here if you want to by reordering questions, adding/removing questions, changing questions, setting permissions, configuring workflows, etc.  That’s just standard SharePoint functionality so I’m not going to cover it here.


Once you are back on the List Settings page you will see a Web Address for your site near the top:



Copy the URL and paste it in your browser address bar to navigate to your new survey (Don’t ask me why this isn’t a hyperlink! :)  ).


This will take you to an overview page that looks like this:



Click on Respond to this Survey to see your survey form.  This is what mine looks like:



Now, we don’t really want to show the end user the Incident ID or Analyst field now do we?  Also, Service Manager already knows this information so I’ll show you how to automatically populate this when the user clicks on the email link and how to hide these controls on the form so the user doesnt have to see them or fill them in/mess them up.


You don’t necessarily need to understand what QueryStrings are because I am going to show you how to do this step by step, but it will make things more understandable if you take a minute to read up on QueryStrings if you don’t already know about them.


To perform the next steps you will need to install the FREE SharePoint Designer 2007.


Once you have SharePoint designer installed and started you will need to connect to your server.  Click on File –> Import –> Import Site Wizard…



Select FrontPage Server Extensions or SharePoint Services and enter the URL to your server (mine is “smdc”).  Click Next










Click Next on this screen:



Click Finish on this screen:




You’ll now have a replica of the SharePoint site files on your local computer.  You can see the folder/file hierarchy on the left:



Expand Lists and then the folder of your survey:



Double click the NewForm.aspx file which will open it in the editing window.


Now we are going to insert some javascript in here that will take the values you pass on the querystring to the form fields.  Immediately after the last <asp:Content> element and before the <table> element paste in the following javascript.



=================================================


<script type="text/javascript">



// This javascript sets the default value of a input field identified


// by <<FIELD DISPLAY NAME>> to the value stored in the querysting variable


// identified by <<QUERYSTRING VARIABLE NAME>>



// NOTE: this only works for single line of text inputs



// Customize this javascript by replacing <<FIELD DISPLAY NAME>> and


// <<QUERYSTRING VARIABLE NAME>> with appropriate values.



// Copyright(c) Microsoft.  All rights reserved.


// This code is licensed under the Microsoft Public License.


// http://www.microsoft.com/opensource/licenses.mspx



// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND,


// EITHER EXPRESSED OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES


// OF FITNESS FOR A PARITCULAR PURPOSE, MERCHANTABILITY, OR


// NON-INFRINGEMENT.



// Original Author: Travis Wright (twright@microsoft.com)


// Original Creation Date: Dec 7, 2009


// Original Version: 1.0



_spBodyOnLoadFunctionNames.push("fillDefaultValues");



function fillDefaultValues() {


var qs = location.search.substring(1, location.search.length);


var args = qs.split("&");


var vals = new Object();


for (var i = 0; i < args.length; i++) {


var nameVal = args[i].split("=");


var temp = unescape(nameVal[1]).split('+');


nameVal[1] = temp.join(' ');


vals[nameVal[0]] = nameVal[1];


}


setInputValueFromFieldName("IncidentID", vals["IncidentID"], true);


setInputValueFromFieldName("Analyst", vals["Analyst"], true);


//setLookupFromFieldName("<<FIELD DISPLAY NAME>>", vals["<<QUERYSTRING VARIABLE NAME>>"]);


}



function setInputValueFromFieldName(strFieldName, strValue, boolHide) {


//this gets the input textbox so you can set the value


var tag = getTagFromTagNameAndTitle("input", strFieldName);


tag.value = strValue;



//if you want to hide the input textbox pass boolHide = true


//this is ugly but the only way to do this given the way SharePoint lays out forms



if (boolHide) {


tag.parentNode.parentNode.parentNode.style.visibility = "hidden";


var TDs = document.getElementsByTagName("TD");


for (var i = 0; i < TDs.length; i++) {


var tempString = TDs[i].id;


if (trim(TDs[i].innerHTML) == strFieldName) {


TDs[i].parentNode.style.visibility = "hidden";


}


}


}


}



function getTagFromTagNameAndTitle(tagName, title) {


var tags = document.getElementsByTagName(tagName);


for (var i = 0; i < tags.length; i++) {


var tempString = tags[i].id;


if (tags[i].title == title) {


return tags[i];


}


}


return null;


}



function trim(str, chars) {


return ltrim(rtrim(str, chars), chars);


}



function ltrim(str, chars) {


chars = chars || "\\s";


return str.replace(new RegExp("^[" + chars + "]+", "g"), "");


}



function rtrim(str, chars) {


chars = chars || "\\s";


return str.replace(new RegExp("[" + chars + "]+$", "g"), "");


}



</script>



=================================================

Now, save the file.


Click on the Web Site tab:



In the lower right select Syncronize and then click ‘Publish Web site’.



Now if you go back to fill out your survey you will see that the Analyst and IncidentID textboxes are no longer visible:



Nice!  Now we need to configure the incident notification template to to our users when the incident status changes to Closed.  Rather than go through this step by step, I’m going to point you back to a post I did awhile ago on configuring templates and subscriptions .  In that blog post I showed you how to pass the IncidentID on the query string.  To pass the assigned to Analyst User Name you’ll need to select the Assigned To User.UserName property.  Your template should look something like this:



Next we need to configure the incident event workflow to send the email notification when the status changes to Closed to the affected user.  To do that go to the Administration workspace, expand the Workflows node, and select the Configuration view.



Then select the Incident Event Workflow Configuration item and click Properties in the task pane.



On this dialog click Add



Click Next on the welcome screen.












Name your workflow and change the ‘Check for events’ to ‘When an incident is updated’.  Click Next.



Select the Changed to tab.  Check the Status checkbox in the Available properties list and click Add.  In the Criteria builder change the drop down value to Closed.  Click Next.



Click Next on the Incident Template screen since we don’t need to update the incident itself in this case.



Check the Enable notification checkbox.  Select Affected User in the User drop down.  Select the notification template you created earlier from the Message template drop down.  Click Add.  Click Next.



Click Create.



Click Close.


Click OK.


You’re done!  Now, let’s test it by assigning an incident to yourself and then closing the incident.  If you get an email and can click the link to take you to the survey you are golden!


Now you can use all the power of SharePoint lists to do all kinds of things like use the RSS Feed, Export to Excel for further analysis using charts/filtering/sorting, or be alerted when a new survey is filled out.



You can also give a quick visual chart on the results in SharePoint:



Using the information in this blog post you could even bring this web page or a report from SQL Reporting Services into the main Service Manager console for easy access!



The management pack to add this view to the console is attached.  You’ll need to change the URL in the XML to match your URL before importing into Service Manager.


Hopefully measuring your quality of service helps you provide better service!  Good luck!


Microsoft.Demo.SurveyResultsView.xml

Version history
Last update:
‎Mar 11 2019 08:19 AM
Updated by: