The Advanced type variables allow you to work with conditions, dates, and fallbacks. Here you can combine variables and use them as conditions. The Advanced type variables consist of three subsections:

  • Conditional variables
  • Dates variables
  • Fallback variables

Conditional variables

You can use conditional variables to tailor your email templates based on specific conditions that are presented in the “if/else” format:

Variable

Description

Example

{{#if A}} Text to show if A is not empty {{else}} Text to show if A is empty {{/if}}

If statement A is true, it returns text specified after {{if}}. If false - text specified after {{else}}. A can be a variable or condition

{{#if Opens>=1}} Welcome back! {{else}} Nice to meet you! {{/if}} → Welcome back! (if you have more than 1 opens from this contact)

OR

Nice to meet you! (if you don’t have opens from this contact at all)

{{#if is_monday}} Have a nice working week! {{else}} Have a nice day! {{/if}} → Have a nice working week (if you send your mail on Monday)

OR

Have a nice day! (if you send it on any other day of the week)

{{#if A == B }} Text to show if true {{else}} Text to show if false{{/if}}

A and B are conditions. If their meanings are equal, it displays text specified between operators {{if}} and {{else}}. In all other cases - text specified after {{else}}

{{#if Title == 'Marketing Director' }} We have an offer for you! {{else}} It may be interesting for you.{{/if}} → We have an offer for you! (if the recipient is Marketing Director)

OR

It may be interesting for you. (if any other title)

{{#if A != B }} Text to show if true {{else}} Text to show if false{{/if}}

A and B are conditions. If their meanings are not equal, it displays text specified between operators {{if}} and {{else}}. In all other cases - text specified after {{else}}

{{#if Title != 'Marketing Director' }} Please forward this to your marketing person. {{else}} It may be interesting for you. {{/if}} → Please forward this to your marketing person. (if the recipient is not Marketing Director)

OR

It may be interesting for you. (if it is)

{{#if A > B }} Text to show if true {{else}} Text to show if false{{/if}}

A and B can be conditions or numbers. If the meaning of A is bigger than B, it displays text specified between operators {{if}} and {{else}}. In all other cases - text specified after {{else}}

{{#if Opens > 5 }} I see you are interested in our product. {{else}} Check out our new product! {{/if}} → I see you are interested in our product. (if the number of opens is more than 5)

OR

Check out our new product!

(if the number of opens is less than 5)

Dates variables

Dates variables allow you to work with dates:

Variable

Description

Example

{{#if is_monday}}{{/if}}

Displays custom text, number, date, etc. between operators {{#if is_monday}} and {{/if}} if you send your mail on Monday

{{#if is_monday}} Have a nice working week! {{/if}} → Have a nice working week! (if you send your mail on Monday)

{{#if is_tuesday}}{{/if}}

Displays custom text, number, date, etc. between operators {{#if is_tuesday}} and {{/if}} if you send your mail on Tuesday

{{#if is_tuesday}} Have a nice Tuesday! {{/if}} → Have a nice Tuesday!

(if you send your mail on Tuesday)

{{#if is_wednesday}}{{/if}}

Displays custom text, number, date, etc. between operators {{#if is_wednesday}} and {{/if}} if you send your mail on Wednesday

{{#if is_wednesday}} Have a nice Wednesday! {{/if}} → Have a nice Wednesday!

(if you send your mail on Wednesday)

{{#if is_thursday}}{{/if}}

Displays custom text, number, date, etc. between operators {{#if is_thursday}} and {{/if}} if you send your mail on Thursday

{{#if is_thursday}} Have a nice Thursday! {{/if}} → Have a nice Thursday!

(if you send your mail on Thursday)

{{#if is_friday}}{{/if}}

Displays custom text, number, date, etc. between operators {{#if is_friday}} and {{/if}} if you send your mail on Friday

{{#if is_friday}} Hope your working week was productive. {{/if}} → Hope your working week was productive.

(if you send your mail on Friday)

{{#if is_saturday}}{{/if}}

Displays custom text, number, date, etc. between operators {{#if is_saturday}} and {{/if}} if you send your mail on Saturday

{{#if is_saturday}} Sorry to disturb you on the weekend. {{/if}} → Sorry to disturb you on the weekend.

(if you send your mail on Saturday)

{{#if is_sunday}}{{/if}}

Displays custom text, number, date, etc. between operators {{#if is_sunday}} and {{/if}} if you send your mail on Sunday

{{#if is_sunday}} Hope your Sunday is a fun day. {{/if}} → Hope your Sunday is a fun day.

(if you send your mail on Sunday)

{{#if is_weekday}}{{/if}}

Displays custom text, number, date, etc. between operators {{#if is_weekday}} and {{/if}} if you send your mail on one of the weekdays

{{#if is_weekday}} Have a productive week! {{/if}} → Have a productive week!

(if you send your mail on one of the weekdays)

{{#if is_weekend}}{{/if}}

Displays custom text, number, date, etc. between operators {{#if is_weekend}} and {{/if}} if you send your mail on one of the weekends

{{#if is_weekend}} Have a cool weekend! {{/if}} → Have a cool weekend!

(if you send your mail on one of the weekends)

{{today}}

Displays a day of the week on which you send your mail

Today is {{today}}. I’ll give you time to think and contact you on {{tomorrow}} again. → Today is Monday. I’ll give you time to think and contact you on Tuesday again.

{{tomorrow}}

Displays the day after the mail was sent

{{now_month}}

Displays a month on which you send your mail

We are planning a lot of new products in {{now_month}}. →We are planning a lot of new products in August.

{{now_quarter}}

Displays a quarter on which you send your mail

I’ll send you a report about {{now_quarter}}. → I’ll send you a report about Q4.

{{now_year}}

Displays a year on which you send your mail

{{now_year}} was a tough year. → 2020 was a tough year.

{{days_from_now N}}

Displays a day of the week for the N day after your mail was sent, including weekends

I’ll write to you on {{days_from_now 2}}. → I’ll write to you on Friday.

(if you send your mail on Wednesday)

{{weekdays_from_now N}}

Displays a day of the week for the N day after your mail was sent, excluding weekends

I’ll write to you on {{weekdays_from_now 3}}. → I’ll write to you on Monday.

(if you send your mail on Wednesday)

{{days_before_now N}}

Displays a day of the week for the N day before your mail was sent, including weekends

We released an updated app on {{days_before_now 2}}. → We released an updated app on Monday.

(if you send your mail on Wednesday)

{{weekdays_before_now N}}

Displays a day of the week for the N day before your mail was sent, excluding weekends

We released an updated app on {{weekdays_before_now 3}}. → We released an updated app on Friday.

(if you send your mail on Wednesday)

{{month_from_now N}}

Displays a month for the N months after your mail was sent

Let's resume this discussion in {{month_from_now 2}}. → Let's resume this discussion in October.

(if you send your mail in August)

{{quarter_from_now N}}

Displays a quarter for the N quarters after your mail was sent

You will get the first result in the {{quarter_from_now 2}}. → You will get the first result in the Q1.

(if you send your mail in Q3)

{{time_of_the_day}}

Displays greeting depending on the time of the day when you sent your mail

{{time_of_the_day}}, Mark! → afternoon, Mark!

(depending on the time when you send the email)

{{day_of_week}}

Displays the day of the week on which you send your email

Have a nice {{day_of_week}}! → Have a nice Wednesday!

(if you send your mail on Wednesday)

Fallback variables

If you don't have enough data about some contacts, a fallback variable will return a variable or substitute it with text/expression when the variable is empty:

Variable

Description

Example

{{Title | 'sales leader'}}

If there is no prospect's title, the variable will replace it with "sales leader"

I know you’re very busy as a {{Title | 'sales leader'}}, but I’ve been wanting to have a quick chat about our new offer. → I know you’re very busy as a sales leader, but I’ve been wanting to have a quick chat about our new offer.

{{Company | 'your company'}}

If there is no prospect’s company in the contact profile, the variable will replace it with "your company"

I’ve been wanting to have a quick chat about bringing our service to {{Company | 'your company'}}. → I’ve been wanting to have a quick chat about bringing our service to your company.

Did this answer your question?