Smartico Help Center
Admin loginSmartico.aiTheAffiliatePlatform.com
  • Welcome
  • Products
    • 🔆CRM Automation
      • ◾Create Journey Flow
      • ◾Event Driven Journey
      • ◾Automation Rules
      • ◾Campaigns vs Automation Rules
      • ◾Segmentation
        • ▪️User State Segments
        • ▪️Behavioral Segments
        • ▪️Imported Segments
      • ◾Activities of Flows
        • ▪️Activity: Email
        • ▪️Activity: SMS, Viber and WhatsApp
        • ▪️Activity: Telegram Bot
        • ▪️Activity: Custom IM
        • ▪️Activity: WebHook
        • ▪️Activity: Limit
        • ▪️Activity: Add Points
      • ◾Communication channels
        • ▪️Email
        • ▪️Liquid Email
        • ▪️SMS, Telegram, Viber, and WhatsApp
        • ▪️Popups
        • ▪️Inbox
        • ▪️Push notifications
        • ▪️Content Variations
        • ▪️Opt-out & Communication Statuses
        • ▪️Gamification activities in the communications
      • ◾A/B Testing
    • 🎮Gamification Blocks
      • Setup steps and checklist
      • Points
      • Gems & Diamonds
      • Levels
        • Level Map
        • Levels Tips & Hints
      • Missions
        • Mission Types & Statuses
        • How to set up a Mission
      • Tournaments
        • Tournament Setup
      • Badges
      • Store
      • Example setup
      • Gamification UI skinning
      • Terms to protect
    • 🧠AI Models
      • ◾AI Enhancer
      • ◾Best Time Model
      • ◾Churn & LTV prediction
      • ◾Favorite product
      • ◾RFM Analysis
      • ◾Sport Recommendations
    • 🎲Mini Games
      • ◾Introduction to Mini Games
      • ◾Game template setup
      • ◾Custom skins for Mini-games
      • ◾Mini-games on the landing pages
      • ◾Using images instead of prize names in Spin the Wheel
      • 🏴‍☠️Treasure Hunt
      • ⚽MatchX Game
        • Creating Rounds
        • Resolution of a Round
        • Leaderboard
        • Game Statuses
        • FAQ: MatchX game
        • Loading MatchX & Quiz games on website
      • ❓Quiz Game
      • 🪂Prize Drop
    • 🗺️Lootbox 2.0
    • 🎁Missions Lootbox
    • 🏆Jackpots
    • 🎟️Raffles
    • 💡General concepts
      • ◾Bonuses
      • ◾Dynamic Rewards
      • ◾Custom Sections
      • ◾Attribution value
      • ◾Label tags
      • ◾Multi-currency usage report
      • ◾Multi-brands support
      • ◾Override translations on Label/Brand Level
      • ◾User markers (tags)
      • ◾Deep-links
      • ◾User roles in Back Office
      • ◾Email Gateways Guide
      • ◾"Client action" event
      • ◾Custom fields/attributes
    • 💻UI Widgets
    • ❔FAQs
      • FAQ: Gamification
      • FAQ: Data Studio & Reports
      • FAQ: CRM Automation
      • FAQ: Front-end integration
      • FAQ: Other topics
      • FAQ: Bonuses
  • Use cases
    • 🔆CRM Automation
      • ◾Cross-sell. Match users on different brands
      • ◾Mini-games usage in marketing campaigns
      • ◾Optimize Communication by excluding disengaged players
      • ◾Automated Sports Campaigns
  • Technical guides
    • ◾Integration process
    • ◾Front-end integration
      • ▪️Extended integration
      • ▪️Push configurations
      • ▪️Acquisition mode
    • ◾Data integration
    • ◾Bonus API integration
    • ◾Secured Messaging Gateways (Email/SMS/IM)
    • ◾Reverse integration
    • ◾Smartico Data Warеhouse
      • ◾Smartico DWH \ Affiliation views
      • ◾Smartico DWH \ CRM views
      • ◾Smartico DWH \ Gamification views
    • ◾Games catalog API
    • ◾Custom push gateways
    • Branded Links
  • More
    • 📝Release notes
      • 🌷May 2025
      • 🌷April 2025
      • 🌷March 2025
      • ❄️February 2025
      • ❄️January 2025
      • ⛄December 2024
      • 🍁November 2024
      • 🍁October 2024
      • 🍁September 2024
      • 🌞August 2024
      • 🌞July 2024
      • 🌞June 2024
      • 🌷May 2024
      • 🌷April 2024
      • 🌷March 2024
      • ❄️February 2024
      • ❄️January 2024
      • ⛄December 2023
      • 🍁November 2023
      • 🍁October 2023
      • 🍁September 2023
      • 🌞August 2023
      • 🌞July 2023
      • 🌞June 2023
      • 🌷May 2023
      • 🌷April 2023
      • 🌷March 2023
      • ❄️February 2023
      • ❄️January 2023
      • ⛄December 2022
      • 🍁November 2022
      • 🍁October 2022
      • 🍁September 2022
      • 🌞June 2022
      • ❄️January 2022
      • 🍁October 2021
      • 🌞July 2021
      • 🌷April 2021
      • ❄️February 2021
    • ⚙️Support Scope
    • 👍Request Demo
Powered by GitBook

More

  • expo.smartico.ai
  • ice.smartico.ai
  • play.smartico.ai

@ 2025 Smartico.ai

On this page
  • Use of fallback
  • Use of conditions & variables
  • Set a specific timezone
  • Set a specific translation
  • Reminders for missions, jackpots etc.
  • URL Encoding and Decoding
  • Many more...

Was this helpful?

  1. Products
  2. CRM Automation
  3. Communication channels

Liquid Email

Liquid is an open-source template language designed to help you build dynamic, data-driven content, making it perfect for personalized and interactive emails. With Liquid, you can embed variables and conditionals directly into your HTML. This allows you to create highly customized emails that cater to individual recipients, leading to more engaging and effective campaigns.

How Does It Work?

  • Variables: Placeholders in the HTML that get replaced with actual data when the email is generated.

  • Conditionals: Control the content display based on specific criteria, making the email content adaptable to different scenarios.

To better understand the capabilities of Liquid lets follow a couple of examples.

Use of fallback

When greeting users, it's important to display their names. However, if some users haven't set up their names, you can use their username (or specific prefix like Mr, player, friend, etc.) as a fallback.

Hello, {{ state.user_first_name | default: state.core_username }}!

Set up name Result: Hello, Christopher! Not setup Result: Hello, christopher90!

Use of conditions & variables

Using conditions and variables in Liquid allows you to display personalized user information, significantly boosting user retention and giving the user a sense of exclusivity and personal attention.

For example, below, we are dynamically displaying the day of the week the email is sent, showing information of the last deposit, current balance amount, and showing countdown for promotion. At the same time, all that info is personalized for each recipient.

{% assign last_deposit_date = state.acc_last_deposit_date | date: "%s" %}
{% assign current_date = "now" | date: "%s" %}
{% assign time_difference = current_date | minus: last_deposit_date %}
{% assign days_since_deposit = time_difference | divided_by: 86400 %}

Happy {{ 'now' | date: "%A" }}! We miss you! You haven't done a deposit for
{% if days_since_deposit <= 7 %} {{ days_since_deposit }} days
{% elsif days_since_deposit <= 31 %} more than a week
{% else %} more than a month
{% endif %}
and your balance is
{% if state.acc_real_balance < 10 %}
really low at {{state.acc_real_balance | plus: 0}}.
{% else %}
{{state.acc_real_balance | plus: 0}}.
{% endif %}.
We have an exciting offer for you! If you deposit in the next {{'now' | date: "%H" | minus: 24 | abs}} hours and {{'now' | date: "%M" | minus: 59 | abs}} minutes , we will accumulate an additional 50% bonus to your deposited amount.

Example Result: Happy Friday! We miss you! You haven't made a deposit for 5 days, and your balance is really low at 3$. We have an exciting offer for you! If you deposit in the next 20 hours and 50 minutes , we will accumulate an additional 50% bonus to your deposited amount.

Example Result 2: Happy Saturday! We miss you! You haven't made a deposit for more than a month and your balance is at 20$. We have an exciting offer for you! If you deposit in the next 23 hours and 04 minutes , we will accumulate an additional 50% bonus to your deposited amount.

Set a specific timezone

Simply adjust the time to a specific timezone used by the email recipient so they don’t get confused by the system time, which is in UTC time. Here is a more detailed explanation: "now" | date: "%s" - gives us the current time of the Smartico system

current_time | plus: 7200 - is where we set the offset by seconds; plus/minus are used to determine if you want to offset ahead/behind, 7200 seconds = 2 hours

{% assign %} is used to create and store a value in a variable which you can manipulate or in this instance, use for calculation

{{ adjusted_time | date: "%Y-%m-%d %H:%M" }} - is what we print to the user, and we define the format %Y-%m-%d %H:%M (year, month, date, hour, minute)

Warning: beware that the values are case sensitive, for instance %M shows minutes and %m shows month

{% assign current_time = "now" | date: "%s" %}
{% assign adjusted_time = current_time | plus: 7200 %}
{{ adjusted_time | date: "%Y-%m-%d %H:%M" }}

Result: Christopher, our Amazing Jackpot has reached an astonishing 67000$. Hurry up and play for a chance to win it!

Set a specific translation

If we want to use dynamic tags like day/month but the recipients are from different countries and speak different languages we can assign specific translations:

{% assign days = {
  "FR": {"Monday": "Lundi", "Tuesday": "Mardi", "Wednesday": "Mercredi", "Thursday": "Jeudi", "Friday": "Vendredi", "Saturday": "Samedi", "Sunday": "Dimanche"},
  "ES": {"Monday": "Lunes", "Tuesday": "Martes", "Wednesday": "Miércoles", "Thursday": "Jueves", "Friday": "Viernes", "Saturday": "Sábado", "Sunday": "Domingo"}
} %}
{% assign current_day = "now" | date: "%A" %}
{% assign user_language = state.core_user_language %}
{% if days[user_language] %}
  {% assign translated_day = days[user_language][current_day] %}
{% else %}
  {% assign translated_day = current_day %}
{% endif %}
{{ translated_day }}!

Spanish user result for Friday: Viernes French user result for Friday: Vendredi

Reminders for missions, jackpots etc.

Boost user engagement by sending email reminders to users when they have progressed in missions but haven’t finished them yet to remind them and trigger user activation. Give users a nudge on the rising Jackpot and motivate them to play more.

Jackpot amount:

{{ state.user_first_name }}, our Amazing Jackpot has reached an astonishing {{state.jackpot_amount}}. Hurry up and play for a chance to win it!

Result: Christopher, our Amazing Jackpot has reached an astonishing 67000$. Hurry up and play for a chance to win it!

Missions in progress:

{{ state.user_first_name }}, do you know that your {{event.meta.image_url}} {{event.meta.name}} mission is still in progress? Finish it and you will get {{event.meta.reward}}!

Result: Christopher, do you know that your “Play 5 Mini-Games” mission is still in progress? Finish it and you will get 10 Free Spins!

URL Encoding and Decoding

URLs can be encoded and decoded directly within your email template using `url_encode` and `url_decode`.

{{ "example.com/questions/what-is-the-question?#Answer#1" | url_encode }}

Many more...

Check all Liquid supported filters and commands below:

Last updated 2 months ago

Was this helpful?

Result:

🔆
◾
▪️
https://example.com/questions%3Fwhat-is-the-question%23Answer%231
Liquid template languageLiquid template language
Logo