Go to website
Use expressions to embed values like names, ages, or use more advanced syntax to build expressions including arithmetic, date & time functions, and more.
All expressions begin with an "@" symbol and an open parenthesis, e.g. "@(now()" or "@(time_from_parts()" Once entered, "@(" will trigger a completion dialogue that lists and explains each function: Simple Syntax This is used to embed single values, e.g. Hi @contact, you entered @results.age for age. Is this correct? An expression can also be a function call, e.g. `H
We've updated our expressions to be easier to use, so you will notice some changes when writing functions in your flows. To see our detailed new guide, click here. If you have any questions, send us a message via the support widget in the bottom right corner.
Expression changes in the new editor
You've always been able to use expressions in your flows to customize messages and make more complex splits. With the new editor we're also introducing some changes to expressions which will make them more powerful and easier to work with. The basic syntax remains the same. For example to include the contact's name in a message action you still use: Hi there @contact.name And if you want to do something more complex like a function call: HI THERE @(upper(contact.name)) There
Date & Time Arithmetic
Use this guide to write date & time arithmetic functions. For example, To add or subtract seconds, minutes, hours, days, months or years to a given date, use @datetime_add: @(datetime_add("2017-01-15", 5, "D")) adds 5 days@(datetime_add(fields.dob, -3, "M")) subtracts 3 months To create a datetime from a known datetime and a separate hour, e.g. Your next appointment is at @(replace_time(contact.created_on, time("15:00”))) To change the time of datetime value, use the *
A logical comparison is an expression which evaluates to TRUE or FALSE. These may use the equals (=), not-equals (!=), greater-than (>), greater-than-or-equal (>=), less-then (<) and less-than-or-equal (<=) operators, e.g. @(contact.age > 18) Note that when comparing text values, the equals (=) and not-equals (!=) operators are case-insensitive.
Limiting the Number of Incorrect Responses to a Question
You may want to set a limit to the number of times a contact can respond to a specific question in your flow, such as with a quiz or survey. You can do this by using the @node.visit_count expression within a Split by Expression action. In the example below, we've created a very simple quiz. We want the contact to have limited opportunities to answer the question, so we will place the @node.visit_count expression on a 'Split by Expression' node to limit the number of guesses. !(https://st