Calculator

Calculator is a field in the "Editor" block that opens when you click on the tab with the same name. In this field, you can perform logical or arithmetic operations, execute functions of API requests from the builder, and available integrations.

It allows you to assign (declare) a variable for the client who has entered this block or update the values of existing variables. This functionality is especially useful for building funnels or tracking traffic sources.

How to use the Calculator in the Builder

Example of calculating a variable’s value in the Calculator field:

Variables can be referenced either by their name directly or using the #{} syntax. All variables are automatically converted to floating-point numbers.

The calculator supports all necessary logical and arithmetic operations.

Comments in the Calculator

To add comments in the Calculator, use /* comment text /. This / */ syntax allows you to write both single-line and multi-line comments:

Remember to always close your comment with the */ tag at the end; otherwise, the comment will continue onto the next line.

Remember to include the closing tag for the comment, even if the comment is the last line in the "Calculator" field.

Constants

"E": Euler’s number e

Supported operators

"+": addition

"-"': substraction

"*" multiplication

"/": division

"%'": remainder of division

"^" "**": exponentiation

"==" "!=" ">" "<" ">=" "<=": comparison operators

"and" "AND" "&&": logical AND

"or" "OR" "||": logical OR

For example, the transition along the connector will occur if the variable Phone_Number is filled. See the figure below:

Last updated