Variables in Pollarix
Variables put respondent, channel and coupon details into your messages and surveys. There are two places they work:
- Message text (email invitations, SMS invitations, automation emails and SMS, and coupon messages) uses the system names below inside double braces, for example
{{contact.firstName}}. - The survey itself uses survey variables that you create in the survey builder. Each channel decides the value of every survey variable.
System names
These 13 names are the complete list. An email or SMS invitation, or an automation SMS, that uses any other name inside double braces cannot be saved; anywhere else an unknown name is replaced with nothing.
| Name | Value | Shown in the picker as |
|---|---|---|
{{contact.firstName}} | The recipient's first name | First name |
{{contact.lastName}} | The recipient's last name | Last name |
{{contact.fullName}} | First and last name together | Full name |
{{contact.email}} | The recipient's email address | |
{{contact.phone}} | The recipient's phone number | Phone |
{{contact.externalId}} | The recipient's external ID from your recipient file or CRM | External ID |
{{coupon.code}} | The code of the coupon the respondent received | Coupon code |
{{coupon.expirationDate}} | The coupon's expiry day (Israel time) | Coupon expiration date |
{{coupon.description}} | The description of the coupon's group | Coupon description |
{{survey.title}} | The survey title | Survey title |
{{collector.name}} | The channel name | Channel name |
{{collector.id}} | The channel ID | Channel ID |
{{survey_url}} | The recipient's personal survey link | Survey Link |
Spaces inside the braces are allowed: {{ contact.firstName }} works the same way. Names are case-sensitive.
A name that has no value for this recipient is left empty. For example, {{contact.lastName}} is empty for a contact without a last name, and the coupon names are empty in a message that is not a coupon message.
Example: invitation email
Hi {{contact.firstName}},
We would like to hear about your last visit. The survey takes two minutes:
{{survey_url}}
Example: coupon message
Thank you for your feedback. Your coupon code is {{coupon.code}}.
It is valid until {{coupon.expirationDate}}.
Survey variables
To show a value inside the survey (a question title, a description or display logic), add a variable to the survey in the survey builder and reference it by its name in braces, for example {customerTier}.
A survey variable gets its value from one of these places. When more than one applies, the first one in this list wins.
- Automation parameters. A workflow parameter marked In Survey is saved on the recipient's response when the Contact Added trigger runs. See Workflow Parameters.
- The recipient file. When you add recipients to an email or SMS channel from a file, the mapping step lets you map a column to a survey variable. Each recipient's personal link then carries that recipient's value.
- The channel's values. On the channel's Dynamic Parameters tab, every survey variable is listed under Survey Parameters. Choose one of the system names above (for example External ID), or type a fixed value under Free Text. A system name is replaced with that recipient's value when the survey opens.
Dynamic parameters
A dynamic parameter is a named value that your recipient lists or web links carry into the survey, such as region or branch. In Pollarix these are the survey variables whose value comes from a recipient column or from a fixed value on the channel's Dynamic Parameters tab (the second and third places above). A web link reads only its own fixed values.
On the Pro and Enterprise plans, a dynamic parameter can also split a team into groups for shared dashboards. See Which parameters and questions can define a team.
What does not work yet
- Per-recipient values in message text. Email and SMS text can use only the 13 system names. A column from your recipient file or a workflow parameter cannot be placed in the message text.
- Values from a web link URL. A web link does not read query parameters such as
?source=newsletter. A web link has no recipient either, so the contact names are empty there; only the channel's fixed values and the survey and channel names have values.
Automations
Automation steps such as HTTP requests have their own template values, for example {{params.customerTier}}. They are described in Workflow Parameters and HTTP Requests.
Next steps
- Distribute surveys - Create email, SMS and web link channels
- Which parameters and questions can define a team - Use dynamic parameters to split a team
- Workflow Parameters - Values that automations collect and pass to the survey
- Automations Overview - Build follow-up flows with coupons and messages