In this article
Note: The Survey Router functionality has been deprecated and is no longer available. The content below is for reference only.
This script function is used to get a Survey ID that the respondent / panelist could be re-routed to - . Here you must supply the key question(s) that you want to be checked by the algorithm. You can supply up to five questions; this value is configurable for On-Premise license holders.
Figure 1 - Example of the GetAvailableSurvey script in use
The parameters for this function comprise an array of the question IDs that you are interested in, for example:
f('targetSurvey').set(GetAvailableSurvey(['gender']));
In this instance the "gender" question is to be checked. If for example the respondent has answered the "gender" question in the original survey by stating they are "male", then the survey routing algorithm will check the remaining surveys in the group and ignore any surveys where the quota for males is already full. As in this case "gender" is the only selection criteria required, the routing algorithm would now select the survey with the highest priority and open that survey for the respondent.
Availability of the respondents quota profile does not consider Optimistically populated (currently active) respondents; only those that have completed the survey and have caused the quota cell to be incremented.
In the event several surveys satisfy the selection criteria and they all have the same priority, a survey will be selected from the group at random.
In the event that no surveys satisfy the selection criteria, no survey IDs will be returned. When a potential survey is found, the system will verify that the respondent has not already participated in that specific survey (username in the respondent table is used as key); if they have then the survey will not be considered as available for selection and the system will attempt to find another survey. After attempting to find another survey three times (this value is configurable for On-Premise license holders) due to the fact that the respondent has already participated, the system will stop trying to find a survey and will return nothing (as if no surveys are available for selection).
An exact match is required for all the criteria listed in the array. So in this case if a survey in the group does not have a "gender" question, then that survey will not be considered for selection by the algorithm.
More than one question can be included in the array; type the question IDs into the array, separated by commas.
More advanced selections can be made by supplying an inclusion or exclusion list of survey IDs as part of this function call (go to Additional Scripting Parameters for more information).