Skip to main content
Kinetic Community

Survey A Triggers Survey B

If you want to have Results of Survey A to Trigger Survey B you could use this functionality

Description

A customer recently asked if Kinetic Survey has the functionality to send a Customer Satisfaction Survey and then based on the results of that Survey they wanted to send out a Manager Follow up Survey.  The customer wants to ensure that the Manager is performing the Follow up action and they also wanted the Manager to to populate three other questions for Continuous Improvement.

For this example I have built an End User Survey which is a Customer Satisfaction Survey and a Manager Follow up Survey (cloned from the End User Survey and then changed as described below).  The End User Survey is Integrated to the KS_SRV_SithcoIncident Remedy form.  The Survey Trigger will fire when 'Status' = "Closed" AND 'Category' = "123456".  The following data is pushed from the KS_SRV_SithcoIncident Remedy form via the Integration workflow:

 

Attribute1 Summary
Attribute4 Category
Attribute5 Type
Attribute6 Item
Attribute9 Ticket Number

 

These Attribute values are displayed at the top of the End User Survey.

The End User Survey has a "Do you want to be contacted by a Manager?" question.  If the "Do you want to be contacted by a Manager?" question is checked then I am sending the Manager Follow up Survey to a Manager.  This action is completed via a Notification on the End User Survey and has the following Qualification:

<FLD>Do you want to be contacted by a Manager;ANSWER</FLD>="Yes"

This Notification is actually what Triggers the Manager Follow up Survey to be sent.  The Message Template is called Manager Contact Requested and is fairly straight forward.  It contains the End User's First Name, Last Name, and an Anonymous URL to the Manager Follow up Survey.  So far it is very common Message Template however, we also want to include a variable in the URL.  This variable will contain the CustomerSurveyInstanceId from the End User Survey.  See the syntax below:

<a href='http://kineticsr.kineticdata.com/kin...e8d9007&ksrid=<FLD>CustomerSurveyInstanceId;179;BASE</FLD>' >Manager Action</a><br>

The variable name is ksrid and it is being set to the <FLD>CustomerSurveyInstanceId;179;BASE</FLD> value.  The CustomerSurveyInstanceId must be added to your Data Set.  My Data Set is called Sithco Incident.

Why did I create this variable you ask? 

The variable is needed because it is used on the Manager Follow up Survey in order to populate the Answers from the End User Survey.  However, before I can use the variable in the Manager Follow up Survey I need to get the parameter from the URL and put the value into a hidden question on my Survey.  To accomplish this I built the following Event:

Event:  load

Action: Cutom

Action Name:  Get KSRID from URL

Custom Code:

var ksrID = KD.utils.Util.getParameter('ksrid');
if (ksrID) {
    KD.utils.Action.setQuestionValue('KSRID', decodeURIComponent(ksrID));
   }

 

Now that we have the KSRID from the End User Survey populated into the Manager Follow up Survey I can use that value in a Set Fields - External Event.  See below:

Event:  load

Action:  Set Fields - External

Action Name:  Set Questions

Form:  KS_SRV_CustomerSurveyResults_join

Qualification:

'CustomerSurveyInstanceId'= "<FLD>KSRID;KS00D0B7A9C485BCzVTgsWKmyQh3Br;ANSWER</FLD>"

With this Event I populate all of the Answers from the End User Survey into the Manager Follow up Survey.

One other issue that I had to overcome was getting the Attributes values from the End User Survey populated into the Manager Follow up Survey.  This is needed because I want the Manager Follow up Survey to have the same information that the End User Survey.  Note that the Attributes are used in the End User Survey in order to populate a Text element with information from the KS_SRV_SithcoIncident Remedy form.  In order to get these four Attributes into the Manager Follow up Survey I created a question for each of the Attribute values (Ticket Number, Category, Type, Item, and Summary).  Now that I have these questions created I can set these questions using the Set Questions Event defined above.

Both the End User Survey and the Manager Follow up Survey have been attached to this document.  Please feel free to download and import them into your environment.