Thanks to a special feature of our service, it is possible to pass answers to survey questions using parameters in the URL of a given survey.

This feature allows, for example, to complete the entire survey and pass answers to all questions in the form of one extended URL link, or to prefill some of the answers in an open survey.

This feature can be used at all survey access levels, as well as with the external_key parameter.


Example addresses

A standard survey link can look like this, for example: https://survey.customerhero.com/survey/1762279/customer-survey.html

When passing parameters in the URL, this link can take the following form: https://survey.customerhero.com/survey/1762279/customer-survey.html?q1=2&q2=3&q3=1,3&q4=horizontal_promotion&q5=Jan,Kowalski,39&q6=jan.kowalski@example.com&q7=15,50,15,50


In the parameters q1, q2, q3…, individual answers to questions are passed.


Supported questions

Single choice question – q parameter values, e.g., 1, 2, 3…, mean each subsequent answer where 1 is the first available answer, 2 – the second, 3 – the third, etc. In this case, the „other, please specify" answer is not supported.

List question – works exactly the same as single choice questions.

Multiple choice question – the q parameter can take two or more values, e.g., q3=1,3,6 according to the selected answers. Similar to single choice questions, the „other, please specify" answer is not supported.

NPS question – the value of the q parameter is the answer number. E.g., q1=11, where 11 is the answer number, which is the answer 10.

Open-ended question – the parameter value is the entered answer. E.g., q5=Holidays,by,the,sea.

Number, e-mail address, date question – parameter values contain the corresponding answer, e.g., number – q4=483, e-mail address – q6=jan.kowalski@example.com, date – q7=15%2F09%2F2015.

Form question – answers from form fields are passed as subsequent parameter values, e.g., in a question about first name, last name, phone number, age: q8=Jan,Kowalski,987654321,42; if the respondent does not provide a last name, the parameter value will look like this: q8=Jan, ,987654321,42.

Point allocation question – allocated points are passed as subsequent parameter values, e.g., q10=15,50,15,50.

Matrix single choice question – the q parameter takes multiple values separated by commas, each value is a row and column number, e.g., q1=1.1,2.1 where 1.1 means the first row and selecting the first column, 2.1 means the second row and selecting the first column. Custom answers, such as elaboration/justification, are not supported.

Rating matrix question – analogously to the matrix single choice question, the q parameter takes multiple values separated by commas, each value is a row and column number, e.g., q1=1.1,2.1 where 1.1 means the first row and selecting the first column, 2.1 means the second row and selecting the first column. Custom answers, such as elaboration/justification, are not supported.

Note! Other question types are not supported.


Access

As mentioned above, this feature works for all access levels.

The same link for each respondent– the title URL parameter must be correctly provided, just as in the case of the survey link.

The same link for each respondent. Password required.  – the survey password must be passed in the URL link using the h parameter, e.g., ?h=difficult_password.

Individual link for each respondent  – a token must be passed in the URL link using the t parameter, e.g., ?t=B9e53A.


Question and answer logic

In the case of questions where the next displayed question depends on the answer, the function of passing answers in the URL also works correctly, and the logic is preserved. If the answer to the first question, on which the next displayed question depends, is passed in the value of the q parameter, the survey will correctly verify the answer and display the proper dependent part.


Displaying a partially completed survey

When answers to some of the survey questions are passed in the URL, the survey pages are displayed depending on the number of parameters passed.

If answers to all questions on a given page are passed, that page will no longer be displayed to the respondent.

If answers are passed for only some of the questions on a given page, that page will be displayed to the respondent so that they can provide the missing answers.


Redirects to an external address

When using the Prefill function, redirecting to an external address also works. The redirect function works from every level of the survey: redirect from a question, redirect from a page, redirect after completing the survey.


The external_key function

Passing an external identifier using the external_key parameter works exactly the same way as with a classic URL link.


Embedding a survey on an external domain

In case the survey is embedded on an external domain, the link to such a survey using the Prefill function looks as follows: http://DOMAIN/prefill/SURVEY_ID/TITLE.html?q1=… meaning, for example, http://www.mycompany.com/prefill/159877/incentive-system-evaluation.html?q1=2&q2=3&q3=1,3&q4=horizontal_promotion&q5=Jan,Kowalski,39&q6=jan.kowalski@example.com&q7=15,50,15,50


Note! Please keep in mind that it is best to obtain any parameters used in the survey URL before connecting the survey to an external domain.