Contents

Create Your Own Survey Today

Free, easy-to-use survey builder with no response limits. Start collecting feedback in minutes.

Get started free
Logo SurveyNinja

Piping

"You selected product X. How satisfied are you with it?" - instead of "product X" the answer from the previous question is inserted. The respondent sees personalized text.

This is piping (data substitution): inserting previously collected values - a respondent's answers or hidden variables - into the text of subsequent questions. In SurveyNinja it is done with the @ symbol in the question title: you pick a source, and the value is inserted automatically. Personalization increases engagement and accuracy. Below - how it works and when to use it.

Piping turns a generic template into an individual one. The same question "How do you like [product name]?" will show different text to different respondents - each one sees what they selected or what was passed in the link.

Inserting into the question text

Piping (data substitution) - a survey technique in which a previously collected value is inserted into the text of a subsequent question or screen. The source is the respondent's answer to a previous question (answer piping) or a hidden variable from the URL (variable piping). Instead of an abstract wording, the respondent sees personalized text: "Alex, tell us about your experience" or "How would you rate the quality of [Business plan]?". It increases relevance, reduces cognitive load, and makes the survey more lively. In SurveyNinja - the @ symbol in the element title, then a choice of source (a question or a variable).

In short: "insert the answer to question 3 here" - and the question text changes for each respondent.

Answer piping: an answer from a previous question

A respondent selected "Food delivery" in the question "Which service did you use?". The next question: "Rate the quality of [Food delivery] from 1 to 5". [Food delivery] is the substitution. Everyone sees their own choice. This is handy for surveys with many options: you do not need to duplicate the question for each product, channel, or city. One template - many personalized questions.

Typical cases: rating a selected product, clarifying a chosen category ("Why did you choose [option]?"), NPS after selecting a plan ("How likely are you to recommend [plan]?").

Variable piping: hidden variables from the URL

The data comes not from the survey but from the link. A CRM sends out personalized links: ?name=Алексей&tariff=Бизнес. In the question: "Alex, how would you rate the Business plan?" - both values are pulled from the URL. The respondent never entered their name or plan - they are already known. Read more about the setup in the article on hidden variables. Piping uses them to display the value in the text.

Personalizing the greeting, addressing the respondent by name, inserting a product name or segment - all of this is done through variable piping.

In SurveyNinja: the @ symbol and the choice of source

In the SurveyNinja builder, type @ in the question text (the element title). A list will open: previous questions and hidden variables. Choose the source you need - the value will be inserted automatically while the survey is being taken. You can set an alternative title to display in the report. Use the @ symbol to reuse answers anywhere in the question text.

Answers with substitution are saved as usual - in the reports you see the final question text (already with the inserted value) and the answer. For analysis, piping does not create separate variables - it just changes the wording.

When piping makes sense

Many options in the previous question - products, services, cities. Instead of a dozen identical branches with logic jumps - one question with substitution. Personalization from a CRM - name, plan, segment. Follow-up questions after a selection: "Why [option]?" - the context is clear without repetition.

When it is not needed: 2-3 respondents with the same answer - the gain is minimal. A short survey with no selection from a list - there is nothing to insert. If the source can be empty (the respondent skipped the question, or the variable was not passed) - plan a fallback text.

An empty value: what to show

If the respondent did not answer the previous question or the hidden variable was not passed - the substitution will produce nothing. "How would you rate the quality of []?" looks bad. In SurveyNinja you can set default text for an empty value. Or use piping only when the source is required - then an empty value is unlikely.

Checking in the preview

Piping only works while the survey is being taken - when editing you see a placeholder, not the real value. Be sure to check it in the preview: go through the survey, select different options, and make sure the substitution fires. Check the case of an empty source - if a respondent skips the question, the text should not "break".

Common mistakes

Piping from a multiple-choice question. The respondent selected three products - which one do you insert? Substituting a single value can distort the meaning. For multiple choice, people more often use logic jumps for each option - or a single general question without piping.

A substitution that is too long. The answer to an open-ended question is two paragraphs. Inserting it into the next question will bloat the text. Piping works better for short values: a name, a category, a single option from a list.

Substitution from a later question. Piping only works "backward" - from questions or variables that have already been set. You cannot insert an answer from a question the respondent has not seen yet.

Case: a survey on service usage

Question 1: "Which delivery service did you use in the last month?" - a single choice from 8 options. Question 2 with piping: "Rate the quality of [answer to Q1] from 1 to 5". Question 3: "What had the biggest impact on your rating of [answer to Q1]?" - open-ended. One template, 8 different personalized surveys. With 500 responses, you do not need to manually group by product - everyone already got their own context.

Piping vs logic jumps

Logic jumps show different questions to different respondents. Piping - the same question with different text. The choice: if you need fundamentally different blocks (different logic, a different number of questions) - jumps. If the question is the same but the wording depends on the answer - piping. You can combine them: a jump on "Yes/No", and inside the branch - piping on the selected option.

Relationship with logic and hidden variables

Piping complements logic jumps: jumps decide which question to show; piping - how to word it. Hidden variables pass data into the survey; piping displays it in the text. For closed-ended and open-ended questions, substitution works the same way - the key is that the source has a short text value. In SurveyNinja, the answers you collect can be reused right in the question wording.

Piping in SurveyNinja is a built-in feature that requires no scripts. The @ symbol in any text field of a question opens the source picker. It suits surveys with selection from a list and personalized CRM mailings.

Piping - substituting previously collected data (answers or hidden variables) into the text of questions. In SurveyNinja - the @ symbol in the title, then a choice of source. Personalization without duplicating questions.

1