Creating a Survey for Use with Web Services
Overview
An Online Form is used to collect data. An Online Form is made up of one or more Surveys, one per page. In the case of the Survey Answer Web Services, the Survey is paired with the Web Services to collect and store the Survey Answers within Simplicity.
Please do not use this documentation to set up a survey UNLESS it is paired with the Web Services. If the survey is to be used to collect data, please refer to the Survey Documentation found on Simplicity’s Online Help.
The Online Form/Survey Explorer
From the main toolbar, select the Customer Interaction Studio [CIS]
From the CIS, select ‘Online Forms’ from the menu on the left. This will bring up the Online Form Explorer.
Creating a new Online Form
Select ‘Add New Online Form’, which is top left on the Online Form Explorer.
Add a form name, and a url branch. The form should also be active:
Optional: Enter the Start Date and End Date if you know them:
Select the ‘Survey’ Form Type:
At this point, right click the name of your form, and select Save.
To use survey with the Web Services, that is all the details you will need to specify for the associated online form.
Creating a new Survey
From your Online Form Record, select ‘Create New Survey’ from the Form Content.
This will bring up an empty survey record.
Enter in the survey name, and make the survey active.
Under questions select ‘Add New Question’
This will bring up a Question Details Explorer.
This is where you define the Survey Answer Field for each Question. Put the Question in the Display Value, and enter the sequence number.
In the field ‘Survey Answer Fieldname’ select a value.
Please ensure that each question has a UNIQUE Survey Answer Value.
Select Save and Close. This will add the question to your Survey.
Add additional questions. Following is an example survey. Please note that each Survey Answer Field is unique.
Values Required for the Survey Answers Web Service Insert Method
Survey_RSN
The Survey Web Service can be used to return the RSN. This service can be accessed via http on port 80 or https on port 443 at the following url:
http://yourcompany.simplicitycrm.com/singleview/entities/surveysvc.asmx
Please note that it is recommended that if you are using this service that the client SCIS website is secured with a SSL certificate.
Using this service, the method ‘SelectByName’ will return a Survey Object with the Survey RSN.
Example Code in VB.Net:
Note: The Web Service References have been referenced as ‘SurveyService’
' Set up Survey Service
Dim surveysvc As New SurveyService.surveysvc
Dim surveyResult As New SurveyService.SelectSurveysResult
' Select Survey by Name
surveyResult = surveysvc.SelectByName(token, 100, "SurveyName")
' Collect Results
If surveyResult.ErrorCode = 0 AndAlso Not
surveyResult.ResultSet Is Nothing Then
Dim survey As SurveyService.Survey
For Each survey In surveyResult.ResultSet
' Collect RSN
Dim RSN As String
RSN = survey.RSN
Next
End If
OnlineForm_RSN
The Online Form Web Service can be used to return the RSN. This service can be accessed via http on port 80 or https on port 443 at the following url:
http://yourcompany.simplicitycrm.com/singleview/entities/onlineformsvc.asmx
Please note that it is recommended that if you are using this service that the client SCIS website is secured with a SSL certificate.
Using this service, the method ‘SelectByName’ will return an Online Form Object with the Online Form RSN.
Example Code in VB.Net:
Note: The Web Service References have been referenced as ‘OnlineFormService’
' Set up Online Form Service
Dim onlineformsvc As New OnlineFormService.onlineformsvc
Dim onlineFormResult As New
OnlineFormService.SelectOnlineFormsResult
' Select Online Form by Name
onlineFormResult = onlineformsvc.SelectByName(token, 100,
"OnlineFormName")
' Collect Results
If onlineFormResult.ErrorCode = 0 AndAlso Not
onlineFormResult.ResultSet Is Nothing Then
Dim onlineForm As OnlineFormService.OnlineForm
For Each onlineForm In onlineFormResult.ResultSet
' Collect RSN
Dim RSN As String
RSN = onlineForm.RSN
Next
End If
Survey_Index
This is the order in which your survey is attached to the online form. If you only have one survey attached to the online form, and the order is not specified, this will be one:
If the survey attached to the Online Form has a survey order specified, then this is the Survey Index to Use.
Page_Index
In a Survey, each Question has the option to start on a new page:
The Page Index is determined by this. If none of the questions starts on a new page, the Page Index will be 1. For every question that starts on a new page, increase the Page Index number by 1.
These are the Survey Questions with the Survey Answer Fields that were set up within the Survey.
Survey Answer Value: Title (eg, Mr/Miss/Mrs etc)
Survey Answer Field: Answer_0001