Variable placeholder syntax
The syntax {variable:...}
is a custom way to display variable values and apply functions to them.
The variable ID value is a unique identifier for each variable.
To use this syntax, replace the ... with the variable ID value. For example, {variable:1002}
refers to a variable with an ID of 1002.
Contact details
Use the syntax {contact:id}
, {contact:name}
, or {contact:email}
to display contact details.
Time
Use {time:unix}
to return the Unix timestamp (seconds since epoch) or {time:iso}
to return the current time in RFC 3339 format (UTC timezone).
Functions
Here are some functions that can be used with {variable:...}
or {contact:...}
syntax:
add(value)
Adds the specified value to the variable value.
{variable:1002:add(2)}
adds 2 to the variable value.
multiply(value)
Multiplies the variable value by the specified value.
{variable:1002:multiply(0.5)}
multiplies the variable value by 0.5.
round(decimalPlaces)
Rounds the variable value to the specified number of decimal places.
{variable:1002:round(2)}
rounds the variable value to two decimal places.
true(text)
Returns custom text when the variable value is true.
{variable:1002:true(Yes!)}
returns "Yes!" when the variable value is true.
false(text)
Returns custom text when the variable value is false.
{variable:1002:false(No)}
returns "No" when the variable value is false.
urlescape(text)
Escapes special characters like "&" and "?" in a URL parameter to make it safe for use in an HTTP link.
{variable:1002:urlescape}
escapes these special characters
Combine functions
It is also combine multiple functions like this: {variable:1002:add(2) multiply(0.5)}
. This adds 2 to the variable value and then multiplies the result by 0.5.