Handlebars is a templating language that allows for dynamic email template personalization, ranging from simple use cases (Company Names, Email Addresses) to more complex scenarios (Nesting Helpers, Conditional Content).
Formatting for handlebars can be used right into the body of your email campaigns, whether you're using the DND Builder or the Basic Editor. They can also be added right into the HTML code.
For example, if your Contact Database featured a Company Name, you could have a sentence in your Email Campaign start with "As a valued customer of {{companyname}}." When the emails gets sent out, thanks handlebars, it will know to replace the "{{companyname}}" text with the associated field in the Contact Database for each user.
Handlebars can use either Simple Variables or Complex Variables.
Simple Variables using alphanumeric characters with optional underscore characters only need to be surrounded by two curly brackets on either side.
Here are some Simple Variables:
- {{emailaddress}}
- {{unsubscribelink}}
- {{companyname}}
- {{current_day}}
- {{current_month}}
- {{current_year}}
Complex Variables feature special characters other than underscores and are required to be wrapped in square brackets within the curly brackets. Complex Variables are often custom fields in your Contact Database.
Here are some examples of Complex Variables:
- {{[First-Name]}}
- {{[Last-Name]}}
- {{[Phone-Number]}}
- {{[Loyalty-Points]}}
In more advanced scenarios, Handlebars can handle advanced dynamic tasks with different kinds of Helpers: Comparison Helpers, Logical Helpers, Utility Helpers, and Nesting Helpers.
For more detailed information, please consult the appropriate article below:
- Comparison Helpers
- Logical Helpers
- Utility Helpers
- Nesting Helpers