Snippet tags: what are they and how to use them
Personalize communication with your users
Introduction
Snippet Tags are pieces of predefined code that can be used in your communication. Snippet Tags allow to personalize the content of communication and dynamically render data for each individual receiver.
In User.com there are several types of a Snippet Tag, please reference the section below:
Personalize content of automatic or mass messages, enabling you to render data stored in user attributes (e.g. first name, days till the end of subscription), and therefore create communication reflecting each receiver's specific situation.
Company Tags
Personalize content of automatic or mass messages, enabling you to render data stored in attributes of companies your receivers are assigned to, e.g. change the company name or tax identification number.
Product Tags
Generate a list of products from a specific segment, category or ids. You can access any product stored in User.com Products section.
Product Event Tags
Generate a list of products from a specific Product Event occurrences stored on receiver's profile.
Event Tags
Generate a list of events from a specific Event occurrences stored on receiver's profile.
Deal Tags
Generate a list of deals stored on receiver's profile.
Activity Tags
Generate a list of activities assigned to receiver.
Email Campaign Tags
Generate a list of email interactions stored on receiver's profile.
Product from Product Recommendations Tags
Generate a list of recommended products based on receiver's product event history.
Author Tags
Personalize content based on the Agent communication is sent from.
Example
This is an example of what you will see in the editor:
This is the end result of dynamically rendered content which a receiver will see:
Use cases
Let's say you have users named John, Marianne, and Sylvia. You want to send the same email to each of them where only the name changes. Start with:
Hi {{ receiver.first_name }}!
and instead of the Snippet Tag your receiver will see their name in the greeting.Using Event Snippet Tags is a great way to send automated emails about Abandoned Carts or Product Recommendations for various customers. It will allow you to prepare only one email message that will display a personalized message for every receiver.
If you want to automate updating Company Attributes, you can use Snippet Tag in the Automation to provide a personalized value for each User and assigned Company. In fact, you can use Snippet Tags in many Automation Modules!
Usage of Snippet Tags can also be useful while automating creation of your Deals. Simply use attributes stored on Users profile to create a name of the Deal or even use it with your Deals custom attribute.
Snippet Tag modifiers
For example, if you don't want to have blank spaces while using a Snippet tag in a Greeting, provide a default value to make your communication flawless. Simply use
{{receiver.first_name|default:"Friend" }}
, in this case, even if the receiver will not have First Name attribute filled, the Greeting will show a Friend instead of a blank space.Full list of filters to modify is available to see in each Snippet Tags section.
Often used Filters:
default:""
Used to provide a default, fallback value if the attribute accessed by a Snippet Tag is empty.
Hello {{ reciever.first_name|default:"Friend" }}
producesHello Friend
when a receiver has no value for the First Name attribute.
cut:""
Used to truncate text values or remove all occurrences of a given text.
{{ receiver.custom_attribute|cut:"-Dog" }}
producesCat
when a receiver hasCat-Dog
as a Custom Attribute value.
date:""
Used to format date according to the provided format.
{{ receiver.trial_ends|date:"D, d M Y" }}
producesTue, 13 Feb 2024
.{% now "c" %}
is a special and very useful template tag that will produce timezone aware timestamp, for example to use in Automations.c
argument controls the produces date format.
truncatewords:2
Used to truncate a piece of text after a predefined number of words. It adds ellipsis at the end of a truncated value.
{{ receiver.product_name|truncatewords:4 }} produces
This product allows users ...
from a valueThis product allows users to maximize growth
.
Where to find Snippet tags
Go to Tools -> Snippet Tags and choose which tags you would like to learn about
How to use Snippet tags
To use Snippet Tags you need to copy text, change variables if needed, and paste it like the standard text to your creation. Once sent to the receiver, it will turn into dynamic user data.