All Collections
Survey customization, branding and white-label
Merge fields in survey templates and autoreplies
Merge fields in survey templates and autoreplies
Alex Bitca avatar
Written by Alex Bitca
Updated over a week ago

NOTE: Merge fields are supported in email, link, and in-app (web) survey templates, as well as in autoreplies in all types of survey campaigns.


Merge fields (you might also see them called "survey variables") give you the possibility to fully personalize your email survey subject line and the content, such as the rating and open-ended questions, and the thank you message.

Personalizing the template will definitely result in a higher open rate for email surveys and an increased response rate for both email and in-app (web) surveys.

Merge field syntax

The contacts you import to Retently have a set of default properties. You can include these properties as merge fields everywhere in the email survey template. A merge field has the following structure: {{ property_name }}.

When Retently sends a survey to someone, this merge field will be replaced with the value stored in this person's property.

For instance, you can address each survey respondent by their first name. Your survey question will look like this: "Hi {{ first_name }}, how likely are you to recommend our company to your friends?"

So John will get the following message: "Hi John, how likely are you to recommend our company to your friends?"

Fallbacks

Ideally, your contacts will have in their profile the data associated with the merge fields. If they don't, then the merge field will display nothing.

Let's take this example:

You have a contact, john@acme.com, that doesn’t have a first name value assigned. Still, your rating question has the first name merge field: "Hi {{ first_name }}, how likely are you to recommend (...)."

The result will be: "Hi , how likely are you to recommend (...)."

Fortunately, there are fallbacks that you can use to assign a default value if the surveyed person doesn't have data stored in the property used as a merge field.

For instance, if you don't have the contact's first name, then you can replace it with "there", and your respondent will see: "Hi there, how likely are you to recommend (...)."

A merge field with a fallback has the following structure: {{ property_name or "other text" }}.

Here are a couple of real-life use cases of fallbacks in merge fields, and what will be displayed in case a merge field returns no data:

  • {{ first_name or "there" }} - if there is no first name, the word "there" will be included in the template;

  • {{ customer_company or "your company" }} - if there is no company name, then it will be replaced with "your company".

IMPORTANT: There is always a chance that at least one contact will not have a specific property, especially if your audience is large. Therefore, we highly recommend the use of fallback to make sure that merge fields are not delivered as blank spaces.

Default and custom merge fields

You can use any of these default merge fields in the template:

  • {{ first_name }} - will display the contact's first name;

  • {{ last_name }}  - will display contact's last name;

  • {{ full_name }} - will display contact's full name;

  • {{ customer_company }} - will display contact's company name;

  • {{ company_industry }} - will display contact's company industry;

  • {{ job_title }} - will display contact's job title;

  • {{ country }} - will display contact's country;

  • {{ city }} - will display contact's city;

  • {{ state }} - will display contact's state;

  • {{ region }} - will display contact's region;

  • {{ phone_number }} - will display contact's phone number.

  • {{response_main_rating}} - will display respondent's main rating response.

Custom properties

You can also use custom properties as your variables. When uploading a CSV file, or syncing an integration, you can create and assign a custom property. The property can be of text, number, date, or collection type.

IMPORTANT: Only custom properties of the text type will be accepted in the survey template as merge fields.

When creating a custom property, you are giving it a name, so that you can reuse it later. Therefore, if you want to use this property as a variable, you have to simply include the property name in the double curly brackets. Here's an example:

  • Your property name is: "Store department";

  • Your merge field name will be: {{ store_department }}.

The structure is simple:

  • If your property name consists of multiple words, then simply replace the spaces with an underscore sign ( _ ). 

  • Write each word in lowercase letters.

Examples of merge fields in templates

When adding merge fields to a survey template, it will end up looking like this:

Here’s what respondents with existing first_name and customer_company properties will see:

And this is an example of a survey where all merge fields are displaying fallbacks:

If you need any help with adding merge fields to your survey template, feel free to reach out.

Did this answer your question?