Zingtree is a powerful tool to help your customers discover answers themselves. Whether the customer is looking for a product recommendation, or the answer to a complex frequently asked question, there may be several different ways to end up at the same response. But when you’re building a decision tree that incorporates many different factors and solutions, the tree can soon become big, bloated and inefficient.

Here’s an example of one of the trees in our demo gallery. This tree was designed to help a customer choose the right bicycle for them from a catalog of 19 different styles, ranging from mountain to folding bikes. It asks a few quick questions; where you plan to use the bike, how old you are, and what your personality type is. But with all these different potential combinations, the tree quickly grew to a whopping 50+ nodes. Phew!

However, with only 19 different bikes on offer and just 3 questions that would direct the customer to their dream bike, this tree could have been built much more efficiently. In big trees like this, you can use logic nodes in order to reduce the number of nodes and send users straight to the solution in a streamlined tree. 

Here’s how you can add logic nodes to this tree to give it a much-needed tidying up.

A Step-by-Step Guide to Tidying Your Tree With Logic Nodes:

1. Make a list of all the different bikes on sale against all the responses that would trigger each recommendation. This will help you to keep track while building out your tree.


2. Make a solution node for each bike on your new tree, copy and pasting the content across.

3. Create the 3 question nodes. On each question add Button Click Variables (you’ll need these to program your logic node), then define them with a Value in the right-hand column. Both the Button Click Variable and Score/Value are important, as they will tell your tree what it needs to look for when recommending a bike.

4. From here, head back to the overview, and create the all-important logic node.

5. Now, you need to start writing some rules, so that the decision tree knows which bike recommendation to give your customer. As there are three factors (where the user likes to ride, their age and their personality) that impact the result, you need to use an Advanced Logic Node. You can select “Advanced” at the top of the page.

Head to our FAQs for all the rules you need to know to use logic nodes effectively and to find out more about Advanced Logic Nodes.

Therefore, your rules here will need to look like this:

(terrain == ‘neighborhood’) && (age == ’16 – 30′) && (personality == ‘friendly’) 

This means that the customer likes riding around the neighborhood, is aged between 16 and 30, and has selected their personality type as friendly, laid-back and traditional. As such, the decision tree will send the customer to the result “Cruiser”, the right bike for their needs.

Once all the expressions and options have been filled out, your logic node will look something like this:

6. Now, your work is done! You have an efficient tree that uses the minimum number of necessary nodes.


Test Your Nodes With Our Debug Tool

Our Debug Tool allows you to run test simulations against each logic node in your tree and gain deeper visibility into any potential issues. You can test a range of variables and values, and review a step-by-step explanation of how Zingtree came up with the decision it did. Read all about it in our dedicated blog article

From Before to After

After implementing a logic node, you are able to make a much more efficient tree. Take a look at the results:

You can see the improvements when comparing designer view before and after.



To make sure your tree building stays as efficient as possible, it helps to take a moment to make a plan before jumping in, and to link back to pre-existing nodes to avoid duplicates. Also, don’t forget to use logic nodes to keep your trees as simple as possible by following our step-by-step tips. It will ensure that your tree building stays as efficient as possible, and save you plenty of time and effort.