Journey Manager (JM) The transaction engine for the platform. | System Manager / DevOps | All versions This feature is related to all versions.
Journey Manager uses the Velocity Template Language (VTL) markup, which allows you to incorporate dynamic data into various HTML documents, such as emails, form flow and notification pages. VTL is the Apache Velocity Project which is a Java-based template engine that provides a template language to reference objects defined in Java code. It aims to ensure clean separation between the presentation tier and business tiers in a Web application (the model–view–controller design pattern). The VTL language is simple yet powerful. We recommend that you get familiar with its syntax first before reading any further.
In short, The VTL is made up of References and Directives. References begin with $
and are used to retrieve a value, for example, $a = FirstName
. Directives begin with #
and are used to perform an action, for example, #get
, #set
, #end
. You can reference data extract values stored for the submission in the email subject or message. Data extract values generally represent data entered by a user filling in a form, and can be used in delivery emails to display data about the user and/or their choices.
To add a data extract value to the email message or subject, use the Velocity variable ${submissionExtractData.extractname}
, replacing extractname
with the submission data extract name and omitting the quote characters. However, if you are unsure whether a given extract value is present, you should add a conditional around its usage.
For example, the following would safely add a reference to the contact phone number provided by the user. Here we assume it is stored in a data extract value with the name UserContactNumber
:
#if (${submissionExtractData.UserContactNumber})
User Contact Phone Number: ${submissionExtractData.UserContactNumber}
#else
User Contact Phone Number: Not provided
#end
A few examples of Velocity Template variables are listed below:
${formDataMap.firstName}
will be substituted by the value in the map for the key firstName
. Another example is ${formDataMap.lastName}
.$environmentName
.Next, learn about the data model.