Advanced Logic Nodes with Expressions

  • Updated

The default Simple Logic Node is designed to be easy to use and foolproof, but if you need more advanced operations you can take advantage of the Advanced option in the Logic Node Editor. You can use parenthesis, as well as comparison and logical operators to build complex rules.

Just click the Advanced option, and you can enter expressions, like those shown below:

2022-04-27_18-59-29.png

Examples

If you have variables named age and state:

(age >= 50) && (state == 'CA') 50 and over living in California
(age < 30) && (age > 20) Over 20 and under 30
state in ['CA','WA','OR'] One of CA, WA, OR
(age < 10) || (age > 80) Under 10 or over 80

 

Reference

You can use the following operators when building expressions:

Type Description Operator
Comparison greater than >
Comparison greater than or equal to >=
Comparison less than <
Comparison less or equal to <=
Comparison equal to ==
Comparison not equal to !=
Comparison identical ===
Comparison not identical !==
Containment matches an item in a list in
Logical and &&
Logical or ||

 

Additional Information:

  • Parentheses can be nested and will be evaluated from left to right.
  • Commas in textual values are stripped, so write your expressions without commas in textual values. E.g. an expression of cost == 1000 will PASS with a cost value of "1,000" or “1000”.
  • Textual values must be quoted (single and double quotes allowed), and will be compared as-is. E.g. state == 'CA' or state == "WA".

More Expressions with CX Actions

This expanded Expressions Language is supported if your account includes CX Actions.

Get CX Actions

Do you want access to this new feature? Contact your Zingtree Account Manager or our Support Team.

Was this article helpful?

5 out of 9 found this helpful

Have more questions? Submit a request

Didn't find what you need?

Our friendly customer support team is here to help

Submit a Ticket

Looking for help or advice?

Reach out to our knowledgeable community of users.

Zingtree Community