You can personalize your surveys and messaging with user traits, such as name, email, phone, and other custom data you’re sending into 1Flow. This allows you to greet the users by their name, show them personalized messaging, and have high-converting messaging at scale - no extra engineering effort required!
Overview
1Flow delivers personalization with Liquid, a popular templating language. Liquid tag comes in the basic format of double brackets
{{ }}
with the content of the tag inside. When a survey is sent to the end user, 1Flow server automatically replaces the tag with each user’s actual information according to our records. You can also specify a default value in case some users don’t have this value saved as a trait already.
Basic syntax
You can use
{{user.trait_name}}
to refer to user’s specific traits (just replace trait_name
with the actual trait name.For example,
Hi, {{user.first_name | default: "friend"}}!
will be rendered as Hi, David!
if user’s first name is David
. If a user does not have
first_name
trait defined, then it will show the default text instead: Hi, friend!
Below is a handy syntax summary to get started:
{{ }}
indicates that this is a liquid tag.
user.[trait]
is how you can refer to the specific user trait to use.
- Use
|
separator anddefault: "default value"
to provide a default value.
Advanced syntax
With Liquid, you can implement more advanced tricks such as changing text to uppercased, add
if-else
statements, compare numbers, etc. directly using the Liquid language. Basically, you can add such processing conditions with the help of the
{% %}
tag.For the vast majority of our users, you do not need to know this. But if you’re curious or have specific needs in mind, you can always read more and explore. For more information, please refer to Liquid documentation (linked below).
Where you can use Liquid
You can use Liquid tags in the content of your survey or messaging, including the title, description, multiple choice options and placeholder text.
You can also use Liquid tags in data logic > open URL action by inserting user trait into the URL.
For example, you can allow user to manage their subscriptions by linking an option to open URL
{{ user.manage_subscription_url }}
.References
To learn more about Liquid, please visit the official documentation.
Introduction
Liquid uses a combination of objects , tags , and filters inside template files to display dynamic content. Objects contain the content that Liquid displays on a page. Objects and variables are displayed when enclosed in double curly braces: {{ and }}.
https://shopify.github.io/liquid/basics/introduction/