Skip to main content
Below are some useful liquid functions you can use when working with dynamic data in Vero. For a more general guide to using dynamic data in Vero, read our help doc on personalising emails with data.

Number precision

This works with any Liquid variable which are numbers. Here is an example:

Utilities

There are a number of convenience functions you can use in Vero.

Formatting

This works with any Liquid variable which are character, decimal (integer) number (base 10), exponential floating-point number, floating-point number, integer (base 10), octal number (base 8), a string of characters, unsigned decimal (integer) number, number in hexadecimal (base 16) It follow the basic printf formatting specifiers ( Printf format cheat sheet) Here is an example:
You can also humanize integers using the ‘humanize’ method:

Encoding

This is primarily useful when you want to pass variables such as email address to URL params. Here is an example:

Date/Timezone precision

This works if you track a date following the ISO 8601 format

Timezone and Formatting

Here are some examples:

with_locale

We provide a with_locale filter that will format the date in the language of the locale passed to the filter.
You can also pass it a user property.

extra.time.now

We provide a custom Liquid variable which lets you access the current time (at the time a newsletter is compiled). To do so, use the code extra.time.now. This will return the current datetime as a Unix integer value. You can transform this value using the date filter in Liquid. Here is a complex example. This example would result if it was run at 11:37pm 12 November (UTC).
View the full list of timezones you can use.

date_modify

We provide a filter for working with dynamic dates called date_modify. This filter takes a string like +7 days or -7 days and adds or subtracts that time from the timestamp. It must be prefixed with either a + or -, and can take any of the following units: years, months, days, hours, minutes. In these examples, the value of “now” is 2024-09-04 17:00.
For even more information about using liquid in Vero, read our detailed liquid guide.