FREE ACCOUNT
Home Features Custom scripting

What is the custom scripting?

The custom scripting is used to change the flow of surveys or take actions based on customized, user-defined triggers. These triggers are based on the responses to the questions.

QuestionPro offers a custom logic engine to apply code scripts in the Apache Velocity language on branching and looping. Velocity is a Java-based template engine that provides a template language to reference Java objects. You can configure this question to apply code scripts on branching and debugging with the below settings.

For a custom logic engine question to function correctly, you need to add a page-break after the question.

Example of custom scripted logic

Consider a sports equipment manufacturing company that wants to conduct a customer satisfaction survey. If the survey participants give a poor rating, they want to ask further questions asking reasons for their grade.

The survey makers can use the custom logic engine question and add the below script to branch the survey to the relevant question.

Custom-scripting-1

Let's say, Q2 is a matrix question. Then, you can reference sub-questions in a matrix as Q2_1 for the first question, Q2_2 for the second, and so on.

If the respondent has rated 1 or 2 in the first sub-question, then the survey jumps to Q3. Similarly, if the respondents have rated low in the second and third sub-questions of a matrix question type, the survey branches to Q4 and Q5, respectively.

Uses of the custom logic question

Apart from branching and looping, you can use custom scripts for the below:

Advantages of using custom scripts in surveys

How to set up custom scripting in your surveys?

Learn how to set up and use this feature with the following help resources:

CREATE, SEND & ANALYZE YOUR ONLINE SURVEY COMPLETELY FREE

CREATE SURVEY NOW