Skip to main content

Three kinds of value

A survey can speak three kinds of value inside its prompts, and writes a set of custom variables to every call: All of them are spoken as text.

Piping into prompts

In a question’s Voice prompt, type / to open the picker: “Type / to insert an earlier answer, a variable or a contact field.” It offers the survey’s variables, every earlier question’s result, and the four contact fields, and inserts the token for you. For example, a follow-up that refers back to a first preference:
You said {{survey.q7.result}} was your first choice. Which would be your second?
Give any question you pipe a lower-case key made of letters, numbers and underscores — for example q7 or first_pref rather than Q7. On the call, results are stored under the lower-case form of the key, so a lower-case key keeps the token and the stored answer identical.
Tokens work in the Voice prompt, in Alternative phrasings, and in battery items’ longer forms.

What a piped answer sounds like

{{survey.<key>.result}} speaks the recorded answer: A question that was skipped, not reached, or asked later has no answer yet, so the token speaks as nothing — a sentence with a hole in it. Anything that is not one of the three forms above is not substituted at all and is spoken out loud as the raw token. Readiness checks for both.

Readiness checks on piped tokens

Each warning names the question and where the token is — its prompt, alternative phrasing (n) or item “(key)” longer form (n) — then one of: A contact field that is empty on the contact record also speaks as nothing, so write prompts that still read naturally without it.

Survey variables

A survey variable holds a value that is not simply one question’s answer — a first preference carried into several later prompts, a region derived from a postcode, or a flag set by a screener.

The Variables card

On the Logic tab, with nothing selected, the Variables card reads: “A value the interview carries rather than one question — set it from a rule with “Set variable”, and speak it in a later prompt with {{survey.var.<key>}}.” Click Add variable: Every survey variable is stored and spoken as text on a call, whatever its Data type — the data type describes the value for your own records. The confirmations are Variable added, Variable updated and Variable deleted. A variable no rule writes is tagged no rule sets it.

Setting a variable

Use a routing rule with the Set variable action. It writes either:
  • The answer to this question — the anchor question’s recorded answer, or
  • A fixed piece of text — whatever you type (The text this rule stores in the variable).
Every variable starts each call empty. If several rules set the same variable, the one that runs last wins. A rule with a condition writes its value when the condition holds and clears the variable when it does not, so two conditional rules on the same variable do not combine — the later one decides the value on every call. Give each conditional value its own variable. A variable that a rule still sets cannot be deleted: “(rules) still sets this variable. Change or delete that rule first.” Example — carrying a first preference. A rule on q7 (first preference), trigger When an answer is submitted, no condition → Set variable first_pref to The answer to this question. A later prompt can then say “Apart from {{survey.var.first_pref}}, which would you choose?”.

Custom variables a survey call writes

Every survey call writes its results to the call’s custom variables under survey.*. All values are text unless noted.

Per question

<key> is the question key in lower case, with anything other than letters and numbers turned into underscores — a question keyed Q3 writes survey.q3.result.

Per call

Gatekeeper variables

Written by the Gatekeeper on every call: The gatekeeper’s own result is not shown in Results or in the CSV export; calls that end at the gatekeeper appear in the Contact funnel (see Results).

Contact fields

These are written to the call. To update the contact record in Contacts, use the recorded answers from Results or the export.