Marketing Cloud guide template language for dynamic email personalisation

Sep 18, 2017

Share this Article

Salesforce Marketing Cloud Guide Template Language (GTL) makes advanced, dynamic email customisation possible. One great way to use GTL is when you’re getting a json request, the individual values in that json payload can be used to customise your emails. If you’re still with me, read on.

>> Click here for the main event page for the London Salesforce Marketing Cloud User Group

The 3rd London Salesforce Marketing Cloud Meetup took place on Sept 14.  Many thanks to Michael Parker of Synapri for hosting the event with a fantastic venue, pizza and plenty of drinks!

Eliot Harper is a Salesforce MVP and a Salesforce Marketing Cloud Consultant based in Melbourne, Australia, and his talk was on Salesforce Marketing Cloud’s Guide Template Language.

London Marketing Cloud User Group - Salesforce Marketing Cloud Guide Template Language (GTL)

We all know AMPscript is the most popular way to personalise your messages, but that is a scripting language.

Guide Template Language (GTL) is a powerful templating language in Salesforce Marketing Cloud that enables you to build highly personalised, dynamic, data-driven messages with ease. Guide simplifies interaction with content and data, particularly when using JSON.

By using GTL, you can create templates which contain elements that define personalisation within the message which include contact attributes and dynamic informations.

GTL is based on Mustache.js and Handlebars.js templating libraries, so it will support valid templates from either of those libraries!

In this video, you will learn:

  • Guide Template Language is most suited for non-complex data structures and facilitates rapid template development.
  • Potential scenarios where you would use GTL include transactional emails (e.g. eCommerce or database emails) or content-based files like weather or twitter feeds.  Just make sure your weather feed is working properly, or it will show “0” degrees!
  • The overall benefit of using GTL and AMPscript over journey builder is the speed in which you can make changes to targeted communication.

Here is the video:

In true best practice, we believe in backups, and my good friend Fayyaz Mian of SFDCTalent also recorded the session here:


Salesforce Marketing Cloud Guide Template Language (GTL) – Glossary

There are quite a few new concepts related to GTL, which is why we thought to put them here in a reference table for your use:

AttributeData stored about a subscriber or contact, such as their name, email address, or purchase history. Used to personalise email content.
BlockA reusable section of code within a template. Blocks can contain content, variables, and logic to create dynamic sections in emails.
ConditionAn expression that evaluates to true or false, used to control whether a section of code or content is included in the final output.
Content AreaA section within an email or template where specific content is placed. Content areas can be static or dynamically populated based on attributes.
Data ExtensionA table within Salesforce Marketing Cloud that stores data used in email campaigns, such as subscriber lists, purchase records, or event data.
Dynamic ContentContent that changes based on the recipient’s attributes or data. Dynamic content ensures each recipient receives a personalised message.
Enhanced Dynamic ContentAdvanced dynamic content that uses complex rules and data to provide highly personalised and targeted email experiences.
FieldA single piece of data in a Data Extension, similar to a column in a database table. Examples include “First Name” and “Email Address”.
Guided TemplateA template designed with GTL that provides a user-friendly interface for creating and editing dynamic content within Salesforce Marketing Cloud.
LoopA control structure that repeats a section of code multiple times. Useful for iterating over a set of data, such as items in a cart.
Personalization StringA placeholder for subscriber-specific data, such as %%FirstName%%, which is replaced with the actual data when the email is sent.
RowA single record in a Data Extension, containing all the fields for one subscriber or data point.
ScriptA block of GTL code that performs a specific task, such as setting a variable, performing calculations, or manipulating data.
String FunctionsFunctions in GTL that manipulate text strings, such as concatenating, replacing, or formatting strings.
TemplateA pre-designed layout used to create emails or landing pages. Templates can include static content, dynamic content, and GTL code for customisation.
VariableA named storage location for a value that can be used and manipulated within GTL code. Variables can store strings, numbers, or other data types.
WrapperA piece of code that surrounds other content or code, often used to apply consistent formatting or logic to multiple sections of an email.
AMPscriptA scripting language used in Salesforce Marketing Cloud to create highly personalised and dynamic content by embedding code within emails and landing pages.
SSJS (Server-Side JavaScript)JavaScript executed on the server side within Salesforce Marketing Cloud, used to interact with data extensions, perform calculations, and automate tasks.

This glossary provides a concise overview of the key concepts and terms related to Salesforce Marketing Cloud Guided Template Language. We hope it helps you understand and effectively use GTL in your email marketing efforts.

If you have further questions, please let us know. Interested in learning more about what we can do for you: marketing cloud consulting.

Interested to learn more?

We would be very happy to help you.