How can I customise my surveys using variables?

For each type of variable, you have multiple possibilities to refine precisely which elements to use.

Variables are customisation elements that you can integrate when: 

  • Editing a campaign.
  • Setting up your actions.
  • Preparing to deploy your surveys.

Variables can be easily inserted in several places: In the label of your questions and also in elements such as "rich content" in order to customise them.

  • In Actions to "notify by URL" and "redirect".
  • In your email and sms templates to customise content according to the recipient.
  • Directly in the name of your report during an export.

For each type of variable, you have multiple possibilities to refine precisely which elements to use according to several contexts.

__________________________________________

How to insert a variable?

To insert a variable, use the following structure:

[#variable-name]

You also have the possibility to simply insert a hash: # it will display all the available variables.

Automatically the list of variables appears. You can navigate by scrolling down the menu.

Summary table

To clarify where and when to use each variable, here is a table listing all the possibilities:

 

You can use variables in:

Title

Variable 

Campaigns (survey and actions) 

Email or SMS templates for deployments

Analysis

TRACKING

Segment ID

[#tt.id]

x

x (sms)  

Segment name

[#tt.name]

x

x (sms)  

Personalized field (segment)

[#tt.{meta}]

x

x  

Attribute name

[#dt.name] x    

Attribute label

[#dt.name.label] x    

CONTACT

Champ de contact 

[#contact.{field}]   x  

Champ personnalisé (contact) 

[#contact.{meta}]   x  
 

You can use variables in:

Title

Variable 

Campaigns (survey and actions) 

Email or SMS templates for deployments

Analysis

CAMPAIGN

Campaign ID

[#campaign.id] 

x

x  

Campaign name

[#campaign.name] 

x

x  

Personalized field (campaign)

[#campaign.{meta}]

x

x  

First question (whit label)

[#campaign.question]    x (if email)  

First question (whitout label)

[#campaign.questionWithoutLabel]    x (if email)  
DIFFUSION
Deployment ID [#deployment.id]  x x  
Deployment name   [#deployment.name]  x x  
Personalized field (deployment) [#deployment.{meta}] x x  
Deployment URL [#url]    x  
Unsubscribe URL  [#unsubscribeurl]   x (if email)  
 

You can use variables in:

Title

Variable 

Campaigns (survey and actions) 

Email or SMS templates for deployments

Analysis

ANSWERS

Answer label

[#ans.{code}] 

x

   

Answer internal value

 [#ans.{code}.
internal_value]  

x

   

Answer label per position in ranking

[#ans.{code}.pos#]

x

   

Answer ID

[#ans.{code}.id]

x

   

URL encoding

[#ans.{code}.url]

x

   

Answer at "local date" format

[#ans.{code}.date]  x    

Answer year date (if date type)

[#ans.{code}.year] x    

Answer month date (if date) 

[#ans.{code}.month] x    

Answer month date (if date type 00
format) 

[#ans.{code}.month0] x    

Answer day date (if date type)

[#ans.{code}.day] x    

Answer hour date (if date type)

[#ans.{code}.hour] x    

Answer minute date (if date type)

[#ans.{code}.minute]  x    
CATEGORY
Most represented category [#acategory.most]  x    
Less represented category [#acategory.less] x    
WEIGHT
Most represented weight [#aweight.most] x    
Less represented weight [#aweight.less]  x    
Weight sum  [#aweight.sum]  x    
Weight average [#aweight.avg]  x    
FORM VARIABLE
Form variable name [#var.name]  x    
LOOP
Iteration number [#loop.Nth] x    
Iteration value [#loop.NthValue] x    
Iteration label [#loop.NthLabel] x    

 

 

You can use variables in:

Title

Variable 

Campaigns (survey and actions) 

Email or SMS templates for deployments

Analysis

VISIT

Referrer URL [#source.url]

x

   

Referrer Host

[#source.host]

x

   

Device type

[#device.type]

x

   

Device screen resolution

[#device.resolution]

x

   

Device OS used

[#device.platform]

x

   

Device navigator used

[#device.navigator] x    

VISITOR

Browser language

[#visitor.lang] x    

FEEDBACK

Feedback ID

[#feedback.id] x    

Feedback URL

[#feedback.url] x    

CLOSED LOOP

Closed loop URL

[#closedloop.url]      
 
 

You can use variables in:

Title

Variable 

Campaigns (survey and actions) 

Email or SMS templates for deployments

Analysis

Date

Current date

[#date] 

x

x x

Current date time (UTC)

[#datetimeUTC] 

x

x x

Current year

[#year]

x

x x

Current month

[#month]

x

x x
Current month with leading 0

[#month0]

x

x x

Current day

[#day]

x

x x

Time (HH:MM:SS)

[#time]

x

x x

Current minute

[#hour] x x x

Current hour

[#minute] x x x

Current timestamp

[#timestamp] x x x

 

__________________________________________

Example N°1: Customise the title of a question according to the respondent

You want to add automatically your respondent's first name directly in the title of the question.

To do this, create a question or edit an existing question in your survey.

Then fill in the corresponding variable where you want it to appear. In our case for the first name we insert the code : [#dt.first_name]

The list of variables is available in the summary table presented above.

You can also insert a hash "#" to display the variable selector. You are free to choose the method that suits you best.

Once you have found the variable, click on it to insert it into your question.

We find the code as we entered it manually: [#dt.first_name]

Once your campaign is deployed, the variable [#dt.first_name] will be replaced by the value to which it refers, in that case, the respondent will see instead his own first name.

Operation completed.

__________________________________________

Example #2: Customise the name of an export of your answers

When you are in the report part of the menu, simply click on the report you want to customise.
Here we have chosen the Design Concept Report.

Then scroll down the page in order to find the button Export answers. It will be under your answers table.

Click on the arrow on the Export answers button.

Then click on "Configure export".

In the first field dedicated to the file name, you can add variables.

For example we can add time variables next to the name of the report.

The goal is to more easily identify each export thanks to the time variables (minute, hour, day, month, year or timestamp) inserted in the files name.

To display the menu, simply enter a # (hash) in the File name field. Then click to choose the item you are interested in.

Once the variables have been chosen and the name filled in (here we use: "ANSWERS-EXPORT"),

You will get this: [#month][#date] ANSWERS-EXPORT

The name and date being variables, they will be automatically adjusted at the time of export!

__________________________________________

Example #3: Customise a question based on the answer to a previous question

We will retrieve the code of our reference question in order to mention it in another question.

Note: The code must be used within the same survey and refer to a question on a previous page, which means the respondent must have validated an answer in order to use it.

To find the code of your question, go to your campaign and edit the desired question.

The code is indicated below the selected element type, here Checkbox list with the code a3pl.

Go to another page after this question page. 

In the following question we would like to show the label of the answer.

We use the type code [#ans.{code}].
{code} is to be replaced by the code of your reference question.

Example: Label of the answer: [#ans.{code}] gives us [#ans.a3pl] 

Register once the code has been configured.

If we answer the survey, and we choose to answer "By the sea" to the first question "Where would you do like to spend your holidays?

In the next question (on the next page), we do reuse the label of the answer to the previous question to ask a new question.

This allows you to finely customise your questions based on your respondents' answers.

__________________________________________

Overview of other customisable elements

The way customisation works is strictly identical to the examples used above.

  • In a rich content

  • In an email template

  • In an SMS template

The principle is the same regardless of where a variable is added.

You are ready to customise your surveys!

__________________________________________

Want to try? Click here 

Was this article helpful?
0 out of 0 found this helpful