High level of personalization for your e-mails, landing pages and text messages using Twig syntax.
{% if contact.companies is defined and contact.companies is not empty %} {% for company in contact.companies %} {% if company.is_primary == '1' %} <p>Primary Company: {{ company.companyname }}</p> <p>Custom Field: {{ company.companycustomfield }}</p> {% break %} {% endif %} {% endfor %} {% else %} <p>No companies associated.</p> {% endif %}
{% for tag in contact.tags %} {{ tag }} {% endfor %}
{% for segment in contact.segments %} {{ segment.name }} {% endfor %}
{% set content = 'https://your.url' | get_content_from_url | json_decode %} {{ content.title }} {{ content.data }} {{ content.link}}
{% if contact.affinity == 'private' %} <p>This is Private Content</p> {% endif %} {% if contact.affinity == 'b2b' %} <p>This is B2B Content</p> {% endif %} {% if contact.affinity == 'agency' %} <p>This is Agency Content</p> {% endif %}
{{ contact.firstname|capitalize }}
{% set feed= 'https://your.rss.feed.url' | rss %} <h1>{{ feed.channel.title }}</h1> <p><a href="{{ feed.channel.link }}">{{ feed.channel.link }}</a></p> <p>Published: {{ feed.channel.pubDate }}</p> <p>{{ feed.channel.description }}</p> <h2>Articles</h2> <ul> {% for item in feed.channel.item %} <li> <h3><a href="{{ item.link }}">{{ item.title }}</a></h3> <p>Published: {{ item.pubDate }}</p> <div>{{ item.description|raw }}</div> </li> {% endfor %} </ul>
{% set dateExpiry = contact.date_last_order |date('d-m-Y') %} {% set today = "now"|date('d-m-Y') %} {% set difference = date(today).diff(date(dateExpiry))%} {% set leftDays = difference.days %} {% if dateExpiry == today %} 1 day {% else %} {{ leftDays }} days left {% endif %}
{% set currentTime = "now"|date("H") %} {% if currentTime >= 5 and currentTime < 12 %} <p>Good morning!</p> {% elseif currentTime >= 12 and currentTime < 18 %} <p>Good afternoon!</p> {% else %} <p>Good evening!</p> {% endif %}
<p>The Gender is {{contact.gender|default('unknown')}}</p>
Tomorrow {{ "now"|date_modify('+1 day')|date("m/d/Y") }} Today {{ "now"|date("m/d/Y") }} Today is happy {{ "now"|date("l") }}
{{ random(['apple', 'orange', 'citrus']) }}
{% if contact.title %} {% if contact.title == "Frau" %} <p>Sehr geehrte {{contact.title}} {{contact.lastname}}</p> {% endif %} {% if contact.title == "Herr" %} <p>Sehr geehrter {{contact.title}} {{contact.lastname}}</p> {% endif %} {% endif %}
{% set cart = contact.json_field | json_decode %} {% for item in cart %} {{item.name | raw }} {% endfor %} (edited)
{{ tokens['{mycustomtoken}'] }}