Category Archives: How To

How-to and tutorial articles.

Tree Nodes: How to Automatically Return to a Previous Decision Tree

Tree Nodes are one of Zingtree’s most popular decision tree building features. By allowing one tree to launch another, you can better organize your work and use smaller components repeatedly as a part of larger processes.

For example, a hardware company that makes lots of products may have a specific troubleshooting process for power-on problems that are common to many trees. By linking to a subtree, this troubleshooter can be authored just once, and used from several different trees.

A common request when implementing tree nodes is to be able to automatically return to the original decision tree that launched the process – just like a return statement in any programming language. This is done using a special type of tree node that is labeled as “return to previous tree.”

Summary: Setting Up a Return to a Previous Tree

Setting up a return tree node requires these steps:

  • Create a tree node in the starting tree, and specify a node number to return to.
  • In the subtree, use a tree node selected as return to previous tree. When this node is reached, the return node in the calling tree appears next.

Setup: Step by Step

  1. Create your starting tree and the subtree that will be launched from the starting tree.
  2. In the starting tree, create a tree node. Include the tree to launch, as well as a node in the starting tree that you want to return to when the subtree is finished (highlighted in red below). It looks like this when editing a tree node:

  3. In the subtree, create a new tree node and specify it as “return to previous tree.” Like this:

When the “return to previous tree” node is reached in the subtree, the return node from the starting tree will appear.

Example

The Zingtree Gallery has an example, both the starting tree and the subtree.

Thanks for Shawn G. and others for the inspiration!

Publishing Pop-Up Decision Trees

Zingtree makes it fun to include decision trees on your site by enabling them to appear on top of any page, simply by clicking a button. We call this publishing method a “pop-up overlay.” You can easily customize the button color, text, and look of the trees.

You can also include multiple trees on one page. Try these examples:

    

 

Here’s how to set up pop-up overlays:

  1. Click the My Trees button at the top of the screen.
  2. Choose the tree to embed.
  3. Select Publishing Links.
  4. Click Pop-up Overlay via Button Click.
  5. Copy the default button code to your web site, or click the Advanced Options button to do some cool customization.

Shortcut: Go here to create a button that launches a pop-up overlay for your tree.

We think this is yet another cool way to incorporate interactive decision trees into your web site. Do you like it? Or have a better idea?

Send us feedback and let us know what you think!

Using a Timestamp Variable in your Decision Tree

Some of our customers have asked for a way to display the current time/date/day of the week in a node, set the time zone, and custom format it. There’s a predefined Zingtree Webhook to do just that!

This webhook sets a variable named #timestamp# which you can use in any part of your decision tree, format it in a variety of ways, and even perform logic operations on it. Click through below to see our demo of how it all works…

 

Example uses:

  • Display the day of the week.
  • Use a Logic Node to route customers to different nodes for work hours, after hours or weekends.
  • Show the current date and time, display it in a node, and save it as a part of your session.

How to Set Up Timestamps

  1. Edit a node, and open the Show Advanced Options link.
  2. Under “Send Message to App”, select Webhook: Zingtree Timestamp.

  3. You can also include an optional timezone or a date format as parameters to sent to the webhook. (More details below). It looks like this:

  4. In the content area for your node, the timestamp will appear wherever you enter #timestamp#.
  5. Click Save Changes when you are done.

See the “Timestamp Webhook Demo” tree from the Zingtree Gallery.

Customizing

In the Message area, you can include two parameters:

  • &tz= to set a time zone.
  • &format= to set a custom date format.

Example message area customizations:

&tz=America/New_York&format=F j,Y h:i:s A
This sets the time zone to Eastern Time (USA), and makes the timestamp variable look like ” July 25, 2017, 11:37:27 AM“.

&tz=Australia/Sydney&format=d/m/Y
This sets the timezone to Sydney, Australia, and makes the date appear as “25/07/2017”.

&format=l
This sets the #timestamp# variable to the day of the week.

See the “Timestamp Webhook Demo” Gallery tree for other examples.

Reference

The full list of timezones is here.

The full list of date formatting options is here.

How to Display a Session Summary in your Trees

We get many requests to make it easy to show a session summary inside of a node. This can be helpful for an end-user to see how they reached a certain decision while traveling through the tree.

This is accomplished using the Zingtree Session Summary webhook. It loads the transcript of the session into a variable named session_history. You can also display any data entered or collected in the session using the variable data_entered.

Try this quick demo from the Zingtree Gallery to see how this works:

Configuring a Node to Show the Session Summary

This requires two pieces:

  • Sending a message to the Zingtree Session Summary webhook at the end of the session.
  • Inserting #session_history# into the node where you want to show the session history.

Optional: To show any data collected via Data Entry fields, you can include #data_entered# in the content area as well.

Step by step:

  1. Edit the node where you want to show the session summary.
  2. Click Show Advanced Options.
  3. Under Send Message to App, choose Webhook: Zingtree Session Summary.

  4. Insert the text #session_history# (or also #data_entered#) into the content area of the node.
  5. Click Save Changes when finished.

The Session Summary Demo gallery tree demonstrates this. Look at node #5 for specifics.

Advanced: Adding a “Copy to Clipboard” Button

To make it easy to copy data to the clipboard, do the following in HTML code view:

  1. Surround the area you want to copy with <div id=”zt-summary> and </div>.
  2. Add this code for the “Copy to Clipboard” button:
    <a class=”btn btn-orange” onclick=”copyToClipboard($(‘#zt-summary’)); return (false);”>Copy  to Clipboard</a>

Node #5 in the demo has this in place for you to examine.

Pro Tip: Returning a Plaintext Summary.

If you want your variables to be formatted as text (instead of HTML), add &formatted=2 to the Message field – like so:


Any questions? We’re here for you

Repeating Forms in Decision Tree Data Gathering

Our call center customers are so enthusiastic about Zingtree that we get some awesome feature requests. In particular, more and more operations are using decision trees for collecting data. One essential part is to be able to collect information on an indeterminate number of items.

For example, an insurance application may need to collect names and ages of each family member – be it one or twenty. Zingtree’s Repeating Forms capability fulfills this need.

How Repeating Forms Work

Quick dive: Try this demo tree from the Gallery.

The details: A node can collect multiple forms, one at a time. First, the agent starts with one form:

The agent can click Add Another to enter a second family member:

This can continue for multiple family members. At the end of the process, when the agent clicks the Continue button in this tree, the tree’s session will data variables set for each family member, like so:

Configuring Forms for Repeat Entries

When editing a node, there’s an option in the Data Entry Fields part to configure repeating items. Here are the details:

  1. Edit the node with the form you want to make repeating.
  2. In the Data Entry Fields area, click the Repeat Form option:

  3. Enter the maximum number of items to repeat (up to 50):

  4. Click Save Changes to save your work.

That’s all you need to do! The data variable names for your repeating forms will have an underscore and an item number at the end. So, in the example above, the variables for name and age will be name_1 and age_1,  name_2 and age_2, etc.

Thanks again to Tom K. for the great feature suggestion. While your trees can gather repeating items, great ideas like this need to be repeated only once to make it into the product.

So if you have a killer suggestion, please share!

Create Decision Trees using Microsoft Excel

decision tree excel

If you’re comfortable using Microsoft Excel, you can build the first draft of your Zingtree decision trees in Excel using a spreadsheet, and then easily import them into Zingtree. Once you’ve successfully imported your tree, you can modify it and enhance it using Zingtree’s editing tools, which offer a lot more decision tree related functionality than Excel.

Here’s how our example tree used in the tutorials appears in Excel:

Overview

Zingtree can create decision trees from Excel, or any similarly formatted tabular source. Your spreadsheets just need to be set up in a specific way for this to work.

Start now by downloading and modifying this example .XLS file:

Download Examples for Excel

Note: This spreadsheet has two tabs: Basic and Advanced.

Here are the rules:

  1. The first row is for column headings. This is important, as it tells Zingtree what type of data is in each column. Make sure to use the column headings as described below.
  2. Column A is for the node number. Usually, this is sequential. It’s required. The heading must say “Node“.
  3. Column B is for the title of a node. Your trees will be easier to read if each node has a descriptive title. The heading must say “Title“.
  4. Column C is the question that is being asked. You can leave this blank if you want an answer node. The heading must be “Question“.
  5. Column D is for any content that appears in the content area.  This is imported as plain text, but you can add formatting, images, and videos later using the Zingtree editing tools. The heading must read “Content“.
  6. If you want to include node tags in your tree, insert a column with a heading of “Tags“. This is optional.
  7. If you are using a scoring variable for scoring button clicks, add a column headed “Score Variable“. This is optional.
  8. The last columns are for the button choices.  The heading over the first button column must be “Buttons“. You can have several columns of buttons.
  9. For the button columns, you can make them link to other nodes by adding the node number in square brackets.  In the above example, cell F2 has a button labeled “Yes” that links to node #2.  ( Yes[2]  ).
  10. If you’re using score variables for button clicks, you can include something like “+3” after the node number in brackets.  This would add 3 to the scoring variable mentioned in the Score variable column. (See the Advanced tab in the sample spreadsheet for an example.)
  11. If you want to add a comment to any node, insert a cell on the right that starts with an exclamation point character (!).

Note: Columns can be in any order, but the column headings must contain the proper text like “Node”, “Question” etc.

You can also make Link Nodes and Tree Nodes with special text in the content column:

  • Example: To make a Link Node that goes to Google, the content area looks like this (see cell D9 in the example):
    LINK: http://google.com
  • Example: To make Tree Node that opens tree ID #123456789, the content area is this (see cell D8 in the example):
    TREE: 123456789
  • Example: To make a Tree Node that opens tree ID #999999999 at node #3, the content area should be:
    TREE: 999999999,3

Once you’ve finished your tree, it needs to be exported as a TXT file. This is also known as a tab delimited CSV.

You can also just copy and paste cells from your Excel document into Zingtree. Excel copies tab delimited CSV data to the clipboard automatically.

Build Your Tree

To start, download our “what to wear” example tree, as an Excel.XLS file.

Open this file in Excel, and start modifying it.  You can use the Basic or Advanced tab – most people start with the basic option. Make sure to keep top row column headings in place. Keep questions in the question column, content in the content column, etc.

When you’re done, you can import it into Zingteee via copy and paste, or by exporting to a TXT file.

Import via Copy and Paste

This is the easiest way to bring your decision tree into Zingtree:

  1. In Excel, select the entire range of cells for your tree, and copy to the clipboard (Ctrl+C or Cmd+C).
  2. In Zingtree, go to the Import via Copy and Paste tool.  (You can also get there via My Trees, Create Tree, then select Import from Microsoft Excel.) A screen like this appears:

  3. Choose Microsoft Excel as the source.
  4. Enter a name for your tree
  5. Paste the data copied from step 1 into the data area. (Use Ctrl+V or Cmd+V).
  6. Click Import and Create Tree.

You’ll see your new tree in the Zingtree overview.

Import via a TXT file

For larger trees, you may find it better to upload a file instead of copying and pasting. Here’s how it’s done:

  1. In Excel, go to File, Save As, and select Text (Tab Delimited) as the type.

  2. The file name will become the name of your tree. Click Save when finished.
  3. In Zingtree, go to the Import File tool. (You can also get there from My Trees, Create Tree, and then choosing Import from Excel.)

  4. If you want to overwrite an existing tree, select it via Replace Tree. Otherwise, a new tree will be created.
  5. Click Import File, and locate the file you created in steps 1 and 2.
  6. The new tree will appear in Zingtree.

Notes:

  • You can use this process to import files from any tab delimited CSV format.

Any questions? Reach out to us anytime. 

This article was originally published January 26, 2017.

Validate Email and Phone Numbers in Decision Tree Data Entry

Besides address verification, Zingtree can also validate phone numbers and email addresses entered while collecting data in your decision trees. Since there’s nothing worse than missing an opportunity due to a typo, being able to ensure good clean data is now much easier.

Here’s a short animation that shows how it works:

Try it Yourself!

The Zingtree Gallery has demonstration trees for validation. Just enter a phone number or email, and move to the next field in the form. A validation status badge appears automatically.

Try the Email Validation Demo
Try the Phone Number Validation Demo

Both phone number validation and email validation work world-wide. If your are entering phone numbers for people outside of the USA, you’ll need to prefix them with a plus sign. USA numbers can be entered without a plus.

Setup

There are two steps to enabling validation:

  1. Using the Settings tool, configure your tree to validate phone numbers or email addresses.
  2. Use an email or phone field type in the data entry fields in your decision tree nodes.


How to set up your tree for Phone or Email validation:

  1. Go to My Trees, and select your tree.
  2. Click the Settings tool, and make sure Verify: Phone or Verify: Email is selected.

  3. Click Update Settings to save.
  4. Now, let’s add a phone or email data entry field to a node.
  5. From Overview, pick a question node to edit, and click the Edit Tool.
  6. Go to Data Entry Fields, and add an Email or Phone Number type field:

  7. Click Add Field, and then Save Changes to save your Node.

Please note: Using phone or email validation is an extra cost, usually $0.01 per lookup.

Tips and Tricks

  • When using validation, it’s best to make sure the phone or email field is the first field, or has at least one more field below it. The validation process doesn’t start until the cursor leaves the edit box, so if it’s the last field in the form the validation may never occur.
  • Once a field is validated, you can hover over the validation badge and get more information about the phone number or email address. Try it!

Summary

Now you have a great new tool to ensure you are getting good, clean data.

As always, if you like this feature, or have any comments or suggestions, please tell us!

 

 

Make Tests, Quizzes, Assessments & More with Zingtree’s Logic Nodes

adding-search-to-decision-trees-6

Zingtree has the ability to create what we call evaluations through the use of logic nodes. These can be interactive tests, quizzes, assessments, training simulations, or anything else that requires assigning a score to each question answered – then later acting upon the total score.

Coupled with the powerful decision tree capabilities already present in Zingtree, logic nodes opens up a whole new realm of knowledge engineering possibilities. To see a working example of an interactive decision tree quiz using logic, try this 10-question Personality Test found in the Zingtree Gallery.

Here are the basics on how to build a tree with logic nodes:

  • Add a value to each button click when designing your tree.
  • As the end-user goes through your tree, Zingtree keeps a running total of the score values of all buttons clicked.
  • When you’re ready to act upon the running total score, use a new “Logic Node”. From there, you can specify rules which redirect to specific nodes.

Want to build your own? Here’s a step-by-step guide:

Step 1: First, go to Overview > Edit Node and open up the button editor by clicking Edit Buttons. Select Score Button Clicks, and enter a Variable Name that will be used to tally scores and branch on later.

581d3092c6fe48-46396098-359664

Step 2: Next, add your desired score values to button clicks in your lead qualification decision tree.

button-scoring

Step 3: Now, add a new Logic Node using This Tree > Add Node. In the Logic Node, you can specify which node should appear next (and which to branch to) according to rules you create.

Step 4: Link the last button click of your test/quiz/assessment to this new Logic Node.

Note that the Logic Node never appears on the screen. When you direct the flow of your Zingtree to this node, it looks at the sum total of all the button click scores and redirects to the proper node.

Need to See More Examples? The Zingtree Gallery has three trees that use Scoring. You can play or examine them to see how they work. See the Logic Demos.

Bonus Tip! 
Want to display the score on a node? Just add the text #score# into the content area.

Other Notes:

  • You should make sure you are using the latest embed code or hosting URL for your tree.
  • If your end-user presses the back button, the running total score will adjust.
  • If the tree is restarted, the running total score resets to zero.

Any questions? Please reach out to us at any time

This article was originally published August, 2015.

Address Auto-Complete and Verification in Decision Trees

Many of our call center customers are using Zingtree to collect data from their customers, and in a sales or shipping application, there’s always an address form or two to fill out. Our customer Tom K. asked us if there was a way to make this process faster, and also to verify addresses to eliminate costly shipping errors. The short answer? Yes! Zingtree has an automatic address auto-complete and verification capability available to you.

Note: There is an extra cost for each address verification lookup: two lookup credits, or $0.02 per lookup. And currently, this is for addresses in the USA only.

Here’s How It Works

As you start entering an address, Zingtree gives you selections on every possible match:

The more text you enter, the fewer matches appear:

Once you select a match, the city, state and zip code are filled in automatically, and the address is verified against the USPS database. If the address is valid, a “USPS Verified” tag will appear in the form:

Try a demo here

How to Set Up Address Auto-Complete and Verification

Setting up a form with address verification requires two parts:

  1. Enable the Verify USA Addresses option in the Tree’s Settings.
  2. Set up your address entry forms, using the new address 1, address 2, city, state and zip field types.

Step by step, here’s how to do it:

  1. Select your tree, and go to the Settings tool.
  2. Make sure Verify USA Addresses is checked. This will enable the special address field types.

  3. Click Update Settings.
  4. Now, go to Overview, and edit a question node where your address form resides.
  5. Locate the Data Entry Fields area, and click Add to add fields.

  6. Add the first line of address entry, using the field type Address 1:

  7. Add the second line of the address, using the Address 2 field type.
  8. Add a field for the city, using the City field type.
  9. Add a field for the state, using the State field type.
  10. Add a field for the zip code, using the Zip field type.
  11. When you’re done, the data entry fields summary will look something like this:

    Important: Make sure the field types are all set properly.

  12. Save your node by clicking Save Changes.

That’s it! If you like, you can copy our Gallery demo tree and modify it for your application. Or, just examine it to see how it’s built.

If you like this feature or have any ideas on how to make Zingtree even more useful, please send us a message.