Simple Logic Nodes

  • Updated

In order to make decision trees that can help solve real-world problems, sometimes you need the ability to do more than just choose a path based upon a finite set of choices. For these reasons, we’ve introduced Logic Nodes into Zingtree.

In addition, we’ve found that many of our customer’s integrations are passing data variables into Zingtree, and there are situations where they would like to act on the value of those variables. Logic Nodes make this easy.

If you’re an existing Zingtree author, Logic Nodes replace Scoring Nodes from previous versions. Any tree that is using Scoring Nodes is automatically migrated to this new system, without losing any functionality or you having to do any updating of your trees.

Here’s How Logic Nodes Work

When you edit or create a Logic Node, you’ll see something like this:

Logic Nodes test the value of your Zingtree variables with a series of rules and jump to a node when a condition is met. The rules are applied in order, so once a rule condition is met, the node assigned to the rule opens next. You can also assign a default node to jump to in case no rules apply.

In the example above, if the variable fruit equals banana, then Zingtree will open node #8, the “Banana” node. If fruit is watermelon, then the default “Something Else” node opens.

About Variables

Variables can be numeric or text, and the comparisons work for either data type. You can bring variables into your trees in several ways:

Note: Your choice of variables is shown in a drop-down list. If Zingtree hasn’t encountered a variable yet in one of the above scenarios, then it won’t appear as an option.

Editing Rules

When editing your Logic Nodes, you can edit your rules as follows:

  • Reorder rules by dragging them up and down with this tool:2022-08-30_12-09-04.png
  • Delete a rule by clicking on this:Delete_Expression.png
  • Select any existing variable from the Variables drop-down.
  • Select an operator (=, ≠, <, >, ≤, ≥ ).
  • Enter a value to perform the test upon.

You must also enter a default node to jump to if no conditions are met.

Advanced Logic Nodes with Expressions

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. Click here to read more about Advanced Logic.

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

Examples: If you have variables named age and state…

Zingtree Logic Nodes give your decision trees a bonus option for adding extra intelligence to your processes and troubleshooters.

 

Was this article helpful?

0 out of 2 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