▪️Tags, properties and event data in the communication resources
Communication resources are supporting user state properties, events data, campaign tags and label tag replacement in the communication resources and in the gamification elements.
User state tags
For example you can build an SMS with text like
Hi {{state.user_first_name}}This will be replaced with the name of the user that is stored in the property "user_first_name".
You can also do a fallback, in case the property is not populated, e.g.
Hi {{state.user_first_name|my friend}}When you use "state." you are referring to what we call "user state property".
Event data tags
In addition, you can refer to the data that is coming in the event, for example
Hi {{state.user_first_name|my friend}}, please follow the link
to reset password {{event.link}}Its important to note that replacement will happen only if the activity of sending communication is very first step in the flow or in other words directly coming from the start of campaign


The particular case of sending links for password reset, mail/phone number confirmation is explained in the Trigger client action through the REST API
Encoding URLs
In some cases you may need to encode URL that is stored in the "state" or "event", you can do that using "smr_encode" modifier:
Hi {{state.user_first_name|my friend}}, please follow the link
to reset password {{event.link|smr_encode}}Campaign tags
If you want to keep specified "state" or "event" properties in the memory of the campaign, you can use "Campaign tags". They are defined on campaign level and provide possibility to "save" the data from user state or from the event during the campaign execution.
For example, you can build following campaign
Campaign is triggered by "Verify mail" action that bring url in the event to verify the email
Campaign tag is saving the "event.url" under the name "verify_email"
Campaign is showing the popup, asking user if he wants to verify email
Upon clicking "ok", campaign is sending email using the tag
campaign.verify_email_url
Campaign tags can be used also to keep fixed values, for example:
You want to build two campaigns sending promotion to different segments of users, one is with promotion of 3 free spins and another one 5 free spins.
You can define such campaigns and in each one define campaign tag with name
free_spins_countwith corresponding valuesyou can define one email resource using
campaign.free_spins_counttag and connect to both campaigns
This way you are keeping one mail resource that is used in different campaigns and replace.
You can father improve the setup, by decreasing number of campaigns to only one, and set free_spins_count value different, depending on the user conditions.

Campaign tags can be used in the resources with following syntax
You will get {{campaign.free_spins_count}} on the next depositLabel tags
Label tags provide possibility to define global tags for your Label that will be available in all types of resources.
The most common reasons to use label tags are:
To keep domain name for the links, in one place. E.g. you have
doman_nametag with value mycasino.com, so if you need to change it tomorrow you don't need to change links in all the resourcesTo keep mail headers and footers shared for all mail resources as label tags, e.g.
mail_headerandmail_footer
You can find more user cases and examples in the Label tags
Example of using label tags:
{{label.mail_header}}
Hi {{state.user_first_name|friend}}.
Please check our promotions <a href="{{label.domain_name}}/promotions">here</a>.
{{label.mail_footer}}Usage of tags, properties in the different contexts
In the table below you can find what kind of tags can be used in the different contexts.
Realtime campaigns
Scheduled campaigns
Realtime automation rules
Scheduled automation rules
Gamification elements (missions, tournaments, mini-games, custom sections, jackptos, etc)
Notes and explanation:
Event data, e.g. {{event.url}}, cannot be used in the scheduled campaigns/rules and in the gamification elements, because these entities that not because they are not triggered by specific event in the context of the user
Campaigns tags are relevant for campaigns only, those not available in the automation rules and gamification elements
Automation rules cannot send any communication, but you can still use user state properties, event data and label tags in the activities like WebHooks and Slack message
You can use user state properties and label tags in the UI of the gamification elements. For example, you missions may contain a link to the Terms & Conditions, that you can place as a label tag
{{label.tc_link}}and reuse cross all missions
Mail resources with Liquid support
Important to note that mail templates with liquied support have wider possibilities in the formatting of underlying data. For example:
You can do fallbacks to the other properties:
Hello, {{ state.user_first_name | default: state.core_username }}!You are more flexible in the formatting of the dates:
Last updated: {{ "now" | date: "%Y-%m-%d %H:%M:%S" }}At the same time, you cannot use label tags in the mail templates based on the Liquid, only - state, campaign and event data tags are allowed.
Read more about Liquid mails templates in Liquid Email
Last updated
Was this helpful?