Personalization and dynamic content in templates

Back to list of guides

1
Chapter
What is personalization and dynamic content?

Freshmail allows you to dynamically personalise the content of your message and its subject line. Thanks to this functionality, your subscribers can receive emails with content which is automatically tailored to set criteria. We’re not just talking about the usual kind of personalisation, but something far more advanced.

shutterstock_191690525 2

 

2
Chapter
How do tags work?

With special tags, you can create a campaign that is carefully aimed at the needs of your clients. Depending on the type of information about your clients that you have access to, you can use tags that will generate different content (text or graphics), after being added to a template.

General remarks

All tags can be embedded in the text content, HTMLFormat HTML + TXTWiadomość, która zawiera format HTML i TXT. Programy pocztowe, które nie będą mogły odtworzyć wiadomości w formacie HTML, wyświetlą ją w formacie TXT. Należy pamiętać, że wyświetlenie wiadomości w formacie TXT uniemożliwi zraportowanie jej w kontekście otwarć. content and subject line. For example:

  • $$name_of_the_custom_field$$
  • $$filtr:name_of_the_field$$
  • $$if:name_of_the_field$$ $$endif$$

screen-personalize

You can read more about tags in this article.

3
Chapter
How to use custom fields

Custom fields

Custom fields are special characters that are located between two sets of double dollar signs ($$). Every recipient is assigned at least two additional custom fields:

  • $$email$$ - here, the email address of your subscriber will be inserted
  • $$name$$ - a custom field assigned to the recipient, it can include any given value

In addition to these, you can create an unlimited number of additional custom fields to correspond to any parameter that you choose (up to 255 characters).

personalization_guide1

Every custom field must have a default value, which is displayed if a custom field is left empty.

It can be added like this:

$$name, default=insert_your_text$$

Personalisation tagTagZnacznik stosowany do klasyfikowania fragmentów tekstu. Pozwala na grupowanie odnośników (linków), umożliwia tworzenie grup na podstawie m.in. kliknięć linków oznaczonych za pomocą tagów. Field value Result
Hello $$name, default=subscriber$$ John Hello John
Hello $$name, default=subscriber$$ - Hello subscriber
$$telephone, default=not given$$ 5xx-xxx-xxx 5xx-xxx-xxx
$$telephone, default=not given$$ - -

 

4
Chapter
How to use filters

You can add a filter to every custom field and change how the field is displayed.

Available filters:

  • upper – every letter will be written in capitals
  • fupper –the first letter will be in capitals
  • title – the first letter of each word will be written in capitals
  • lower –every letter will be written in lowercase

Filters should be inserted inside the $$ characters, right in front of the custom field’s name. The filter and the custom field should be separated by a colon, i.e: $$filter:custom field$$

Examples of how to use filters:

Personalisation tags Field value Outcome
HELLO $$upper:name$$ John HELLO JOHN
HELLO $$upper:name - HELLO
$$title:company, default=not given$$ MY company My Company
$$fupper:company, default=not given$$ MY company My company
$$upper:comapny, default=not given$$ MY company MY COMPANY
$$lower:company, default=not given$$ MY company my company
$$upper:company, default=not given$$ - -

5
Chapter
Conditional and comparative expressions

Conditional expressions

Conditional expressions are special characters which allow you to display additional content in your emails on the basis of custom fields assigned to a given subscriber. The available conditional expressions are:

  • if – indicator which begins a conditional expression
  • endif – indicator which ends a conditional expression

Conditional expressions should be placed inbetween $$ signs, as a value after a colon you should insert a custom field whose value you want to check, so: if: custom_field$$ or $$if:custom_field=value$$.

Every $$if:custom field$$ expression has to have one $$endif$$ expression.

Methods for comparing values:

There are three methods, which you can use to compare values:

  • no sign   indicates that you are checking whether a given field has any value
  • =  indicates that you are checking whether a custom filed equals a certain value
  • !=  indicates that you are checking whether a field doesn’t equal a given value

 

Embedding comparative expressions

Every expression can be embedded any way you like. Any depth of embedding is permitted and any use of other additional fields inside conditional expressions (conditions). When embedding expressions, you should maintain the accuracy of all the personalization tags and close all open conditional tags.

Examples of use:

Below are examples of how to use personalization tags and conditional expressions.

 

Example 1

przykład1newParsing result:

Hello John!

Today is Thursday, May 20, 2014. You recently bought “Romeo and Juliet”, so please leave a review of your purchase! Since you are our regular customer, as a reward we would like to give you a 15% discount on your next purchase!

 

Example 2

przykład2_new

Parsing result:

Hello Matt!
We have a promotional voucher for you, you can use until 05/27/2014 to get a 10% discount!

przykład3_new

Parsing result:

Hello Anna!
We have a promotional voucher for you, you can use it until 05/27/2014 to get  a 10% discount!