Skip to main content
Use a template with expressions and filters to render output based on the supplied data. You write a template using the Twig templating language, feed it the values you want to use, and the transformer renders it into a single piece of text that is placed back into your data. This is handy whenever you need to build a formatted string, such as an order confirmation message, an email body, a CSV row, or a small block of HTML or XML. The template can pull in values, loop over lists with for, make decisions with if, and reshape values with a set of built-in filters: abs, batch, capitalize, default, escape (and its short name e), first, format, join, keys, last, length, lower, nl2br, number_format, replace, reverse, round, striptags, title, trim, upper, and url_encode. For safety the template can only use these filters and the if and for tags.

Fields

Sample data

FieldValue
TemplateDear {{ customer.firstName }} {{ customer.lastName }}, your order total is {{ order.total }} {{ order.currency }}.
Variablescustomer = &{customer}, order = &{order}
Destinationorder.confirmationMessage
Input:
{
    "customer": { "firstName": "Maria", "lastName": "Janssen" },
    "order": { "currency": "EUR", "total": 149.5 }
}
Output:
{
    "customer": { "firstName": "Maria", "lastName": "Janssen" },
    "order": {
        "currency": "EUR",
        "total": 149.5,
        "confirmationMessage": "Dear Maria Janssen, your order total is 149.5 EUR."
    }
}