Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

Mail templates are written in the Velocity Template Language, or VTL (official documentation). It is basically HTML with some (simple) logic possibilities and enables the user to create custom templates based on its needs.

Table of Contents



Code Block
titleAn excerpt from the default template
#if($bookings.size() ne 1)
#set ($bookingQ = "These bookings match")
#set ($bookingQ = "This booking matches")
#foreach($booking in $bookings)
		<td><a href="${origin}#campaignDetail/bookingDetail/${booking.Id}/${booking.campaignId}"> ${booking.Id} </a></td>

This The above example can translate to the following result that shows which bookings match the alert:

It enables the user to create custom templates, based on the needs.


As you can see, you can You can add internal info into to the template , as well as some logic.



Parameters are prefixed with $, and commands with #.

Setting parameters

The basic syntax for setting a parameter is:

#set ($parameter = "value")


The value of the parameter can be a simple string, integer, calculation or concatenation. More info in the following Documentation

If-else constructs

The syntax for an if-else statement is:

Code Block
  >run if true<
#elseif(second condition)
  >run if first condition if false and second true<
  >run if no previous conditions is true<


Parameter nameMeaning
$booking.idAn integer representing the booking ID
$booking.campaignidAn integer representing the booking campaign ID
$booking.nameA string representing the booking name
$booking.descriptionA string representing the booking description
$booking.toReachVolumeAn integer representing the booking to reach volume
$booking.startDateA Date date representing the booking start date
$booking.endDateA Date date representing the booking end date
$booking.startTimeA LocalTime representing the booking start time
$booking.endTimeA LocalTime representing the booking end date
$booking.daysOfTheWeekOnlineAn integer Set set representing the days of the week online (monday -> 1, tuesday -> 2, ..., sunday -> 7)
$booking.deliveryMethod.value()A string object representing the booking delivery method: "auto", "sov" or "rotation"
$booking.deliveryMultiples.value()A string representing the booking delivery multiples: "all-together", "one-at-a-time" or "free"
$booking.creationA Date date representing the booking creation date
$booking.lastModifiedA Date date representing the date of the last booking modification
$booking.slot.idAn integer representing the booking slot idID
$booking.slot.nameA string representing the booking slot name
$booking.waveIdAn integer representing the booking wave idID
$booking.pricingCodeA string representing the booking pricing code: "cpm", "cpc", "cpp", " adm" or "cpl"


This contains all the information about the alert fired:


All objects represent their Java counterparts, which means that you can use any Java method supported by that object.E

Code Block
titlee.g. a string
Code Block
<p>This is a
#if ($,1) == "!")
#elseif ($,1) == "-")
priority alert.</p>