The dynamic content and macros
Artur Zbiejcik avatar
Written by Artur Zbiejcik
Updated over a week ago

When you create the content of a survey, an invitation, or an email sent to the respondent after completing, it is often necessary to include personalised or response-based information.

To enter such information, use the Dynamic Content (Macros) feature. The principle of the operation is very similar to the mail merge options known from, e.g. Microsoft Word, where in addition to the exact text for everyone, we can insert different content for each recipient, taken from an external source.

In the following article, you will find a list of available macros, information on which areas are available, and how to use them. Some macros are available only when creating an invitation to the survey, some only in the body of the questionnaire, some on the thank you page and in the e-mail sent after completing the survey, and some in all of these mentioned areas.

A complete list of supported macros and places where they are available:

How to insert dynamic content?

It's effortless to insert macros and dynamic content. There are two possibilities. The first one is to use the advanced content editor and select the appropriate item in the "Tags" drop-down menu.

The second is to enter the macro's name in the form as in the table above and the examples below, directly into the content, for example, [ANS_ID_12345] or [ANS_ID_12345.2]. This is especially useful in places which do not have the option of advanced content editing, such as the content of the question. To check how a given macro works in practice, we recommend testing it with a test fill-in or after sending test e-mails.

Below is a list of all macros with examples of their use.

The answer is given in the question

[ANS_ID_12545], [ANS_ID_32645], [ANS_ID_32232], [ANS_ID_12345.1], [ANS_ID_56984.2] etc.
Thanks to this macro, you can insert into the content of a question the content of the answer provided on the previous page of the survey, or to the content of a message, the responses given by the respondent in the just-completed survey. This is especially useful when you want to make the questionnaire more dynamic without duplicating the questions. Only the selected answer or the text entered by the respondent will appear in the content - the content of the question isn't going to be inserted automatically, so remember to insert it into the template by yourself. Currently, the macro only works for the following question types: single-choice, multiple-choice, form, drop-down, open, form, e-mail question, date and number.

In the form-type question and in the open-ended question, which allows entering more than 1 answer, we can use the macro to select a specific answer using the [ANS_ID_42345.2] notation where 42345 is the unique ID of the question, and 2 is the second answer or second item in the form.

Macros should be inserted using the "tags" drop-down list in the advanced editor.

Example 1:

Thank you for applying to participate in the conference "Platforms for online surveys and saving trees".

Your data:
[ANS_ID_00001] //Question 1 is a question of the form type//

Special requirements:
[ANS_ID_12354] //Question 3 is an open-ended question//

The interest in the thematic block:
[ANS_ID_45658] //Question 4 is a drop-down question//

The effect:

Thank you for applying to participate in the conference "Platforms for online surveys and saving trees".

Your data:
Name - Marcin
Surname - Lato
e-mail - marcin.lato@email.com

Special requirements:
I would like a vegan meal, please.

Interest in the thematic block:
Application examples in the medical industry

Example 2:

In question no. 3, you said you spend your time most willingly [ANS_ID_525848]. What activities do you do there?

The effect:

In question no. 3 you answered that you spend your time most willingly at the seaside. What activities do you do there?

The percentage and the numerical result obtained in the test

[TOTAL_PTS], [TOTAL_%]
If your survey is a knowledge test or evaluation, you can summarise or send the respondent the obtained result in numerical and percentage terms. You can also present the sub-result when filling in the questionnaire.

Example:

The result you obtained: [TOTAL_PTS] points. In percentage terms, this is [TOTAL_%]. Congratulations.

The effect:

The result you obtained: 50 points. In percentage terms, this is 41.67%. Congratulations.

The feedback and interpretation of the obtained result

[FEEDBACK]
If your survey is a knowledge test or an assessment, and you have set up the display of the feedback based on the score obtained, you can view or send the result to the respondent in summary. If there are multiple areas and multiple feedbacks in the survey, they will be displayed one below the other.

Example:

The result you obtained: [TOTAL_PTS] points.

[FEEDBACK]

The effect:

The result you obtained: 50 points.

You need to work on employee relations.

You are doing very well in the implementation of the tasks assigned.

We recommend developing knowledge in your field through participation in training courses.

The contact and respondent labels

[NAME_LABEL] for example, [NAME], [SURNAME], [COMPANY]
Thanks to this macro, you can use contact labels in the content of a questionnaire, invitation or e-mail after completing, and thus personalise the message for each respondent.

The following conditions have to be met for this macro to work correctly:

  • contact labels have to be entered in the appropriate tab

  • contacts have to be imported with the above-mentioned information

  • imported contacts must be added as survey respondents in the "send to e-mail" tab.

Example:

Welcome [NAME],

You are working [SENIORITY] in the [BUSINESS] company. Please rate the time spent in this organisation.

The effect:

Welcome, Raphael,

You have been working for over 2 years in the IBM company. Please rate the time spent in this organisation.

Survey title

[TITLE]
The macro allows you to insert the just completed survey's title into the content.

Example:

Thank you for completing the "[TITLE]" survey. The results will be sent to your account 14 days after the end of the survey.

The effect:

Thank you for completing the "Risk factors among people working in glassworks" survey. The results will be sent to your account 14 days after the end of the survey.

The verification code after completing the survey

[VERIFICATION_CODE]
Thanks to this macro, a code verifying the completion of the survey generated for a given respondent will be inserted into the content of the email after completing it or on the thank you page.

Example:

Thank you for completing the survey. Your verification code to present to the seller is: [VERIFICATION_CODE]

The effect:

Thank you for completing the survey. Your verification code to present to the seller is: DX4J21

The external key tracking parameter

[EXTERNAL_KEY]
This macro allows you to insert an external key used to refer to a given survey. This is useful, for example, when the respondent is redirected to another survey, keeping the given key (for example, redirection to a survey in a different language version).

Example:
To complete this survey in English, please go to: https://www.startquestion.com/survey/169456/holiday-survey.html?external_key=[EXTERNAL_KEY].

Effect:
To complete this survey in English, please go to: https://www.startquestion.com/survey/169456/holiday-survey.html?external_key=fckgwrhqq.

The respondent's e-mail address

[E-MAIL]
This macro displays the e-mail address of the respondent completing the survey. It can be used only in surveys with the access by personal link for each respondents and when sending invitations from the Startquestion.com system.

Example:

You are completing the survey as [E-MAIL].

If that's not you, please stop.

The effect:

You are completing the survey as monica@example.com.

If that's not you, please stop.

Respondent's ID

[ID_RESPONDENT]
This macro displays the system ID of the respondent completing the survey. You can use the respondent's ID in webhook alerts to update the respondent's data.

Survey URL

[HREF]
This macro shows the URL of the survey to which you are creating the invitation. This address will also contain a token if you create a survey with access by personal link for each respondents.

Example:

Hello, I would like to invite you to complete a survey. You will find it at <a href=[HREF]>this</a> address.

The effect:

Hello, I would like to invite you to complete a survey. You will find it at this address.

Link to the survey:

[LINK]
This macro is similar to the macro mentioned above, except that it presents the survey's address in HTML format. This is useful when your invitation is also created in HTML (for example, mailing). The form of this kind of link is <a href=”[HREF]”>[HREF]</a>.

Example:
<html>
<head>
<meta http-equiv = "Content-Type" content = "text / html; charset = UTF-8" />
<title>An invitation to a survey</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body style="margin: 0; padding: 0;">
<table border="1" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
Hello, I would like to invite you to complete a survey. You will find it at [LINK].
</td>
</tr>
</table>
</body>
</html>Effect:
<html>
<head>
<meta http-equiv = "Content-Type" content = "text / html; charset = UTF-8" />
<title>Invitation to a survey</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body style="margin: 0; padding: 0;">
<table border="1" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
Hello, I would like to invite you to complete a survey. You will find it at <a href=" https://www.webankieta.pl/ankieta/159877/t/d2c2e3/ocena-systemu-motywacyjnego.html "> https://www.startquestion.com/survey/159877/t/d2c2e3/evaluation-of-the-incentive-system.html </a>.
</td>
</tr>
</table>
</body>
</html>

The survey's access token

[TOKEN]
Thanks to this macro, you can insert a token in the invitation's content intended for the respondent to log in to the survey with access by personal link for each respondents.

Example:

Hello, I would like to invite you to complete a survey. You will find it at https://www.startquestion.com/survey/159877/t/d2c2e3/evaluation-of-the-incentive-system.html.
To complete it, you must use the: [TOKEN] token.

The effect:

Hello, I would like to invite you to complete a survey. You will find it at https://www.startquestion.com/survey/159877/t/d2c2e3/evaluation-of-the-incentive-system.html.

To complete it, you need to use the: d2c2e3 token.

It should be remembered that the [LINK] and [HREF] + [TOKEN] macros can be used interchangeably for the survey with access by personal link for each respondents. In the first case, the address immediately contains the token, and the system recognises it automatically. In the second case, a form will appear in which you must manually enter the token.

The sum and average of the points for a particular area

[AREA_NAME_SUM], [AREA_NAME_AVG]
This macro allows you to display the sum of points obtained in the test in a specific characteristic, which we identified when determining the feedback for the respondent. In the macro, instead of AREA_NAME, we should put the name of our area, for example, [MANAGERIAL_SKILLS_SUM] or [CREATIVITY_AVG], if the "Managerial skills" and "Creativity" areas have been defined.

Example:

Thank you for completing the self-assessment questionnaire.
In the managerial predisposition test, you received [MANAGERIAL_SKILLS_SUM] out of 100 possible points.
In assessing the ability to deal with stress, you received [STRES_SUM] out of 100 possible points.

In the test for the knowledge of the processes of our organisation, you scored an average of [KNOWLEDGE_AVG] points.

The effect:

Thank you for completing the self-assessment questionnaire.
In the managerial predisposition test, you received 74 out of 100 possible points.
In the assessment of the ability to deal with stress, you received 22 out of 100 possible points.

In the test for the knowledge of the processes of our organisation, you scored on average 3 points.

A link to download the completed sheet

[GET_RESPONSES_URL_PDF] and [GET_RESPONSES_URL_XLS]
These macros allow you to add a link to a PDF or Excel spreadsheet with the survey completed by the respondent to the thank you page or the e-mail send after completing the survey. It is useful when we want the respondent to archive his/her filling. The link will be active until this respondent's sheet is in the system. The link can be changed to a button or be hidden under a nicer name using the HTML editing in the editor.

Example:

Thank you for entering the competition.
You can download your answers from the link below:
[GET_RESPONSES_URL_XLS]

The effect:

Thank you for entering the competition.
You can download your answers from the link below:

The token along with the survey ID

[TOKEN@ID_SURVEY]
Thanks to this macro, you can display a token with which the respondent will gain access to the survey with the given ID. The necessary condition is that in the source and target surveys there should be a respondent with the same e-mail address. This is useful when it is necessary to identify the respondents, but we would like to give them the opportunity to, for example, change the language version of the survey.

Example:

In order to complete this survey in English, please go to: https://www.startquestion.com/survey/169456/t/[TOKEN@169456]/holiday-survey.html

The effect:

In order to complete this survey in English, please go to: https://www.startquestion.com/survey/169456/t/4g6s8k/holiday-survey.html

What is worth remembering?

  • To learn how to create token-secured surveys, go to the article entitled: The printout of individual links (tokens) to a survey.

  • Macros of the ANS_ID_* type do not work in widgets. In the case of a widget it is necessary to use working macros which are the older implementation of macros, which means [ANS_*no*], where no is the number of the selected question.

  • For more information on how to use answers to questions in the body of questions, see the article entitled: The answer to the question in the body of subsequent questions.

  • You can learn about how to present the respondents' data in the invitations and questionnaires addressed to them in the article entitled: The respondent's data in the questionnaire and invitations to complete a survey.

Did this answer your question?