Tag Archives: decision tree spreadsheet

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.

Updates: Spreadsheet Import Enhancements and More

updates-blog

When we launched our new feature that allows you to create decision trees from Excel and Google Sheets, we had no idea this feature would be as popular as it has become. Some of our bigger clients, in particular, have really run with this and suggested a lot of great improvements.

Here’s what’s new with spreadsheet decision tree imports:

  • Fix: Validates Tree IDs on spreadsheet import for tree nodes.
  • Fix: Importing and replacing a tree keeps the tree’s settings intact (Elliott).
  • Update: Spreadsheet import allows columns in any order (Elliott).
  • Update: Spreadsheet import allows for a Tags column (Jamel).
  • Fix: Errors in spreadsheet import won’t delete a previous tree if we’re replacing a tree.
  • Fix: Importing Excel with line breaks in cells now works properly, retains line breaks (Charlie).
  • Fix: Importing pasted spreadsheet data now saves the first iteration in Snapshots tool.
  • Update: Spreadsheet import can now include TREE and LINK nodes (Elliott).
  • Update: Exporting CSV tree from Overview/Simple now adds TREE and LINK node types into CSV data.
  • Fix: Importing trees with button links to non-existent nodes now sets the link to “unlinked” (Elliott).

We’ve also done some other tweaks outside of spreadsheet imports:

  • Update: Use “send_zendesk_button” as a node tag to send the button text to Zendesk as a tag instead. (Elliott)
  • Fix: Agent Portal now shows merge variables for agent_name (Craig).
  • Update: Added Agent List export to the My Agents page (Gene).
  • Update: Added more error checks to Add Multiple Agents input tool.
  • Update: Made show/hide tree name option more visible in iFrame Advanced Options.
  • Fix: Copying a Gallery tree into a new account works properly.
  • Update: Max attachment size in email nodes increased to 25 Mb (Dan B.).
  • Update: Merge variables now has an option to retain plus characters (Chris).
  • New: API call to delete session data from our servers for a particular session ID (Jay).
  • Fix: email-session-info occasionally failed when data was entered right before sending (Alok, Craig).

Phew!

Got a suggestion to make Zingtree better? Give us a holler.

Update: Import from Excel, Google Sheets

NL-header-updates3

In spite of the fact that Zingtree has some really great ways to build interactive decision trees, we still get a lot of requests for making the process of creating trees even easier.  Many people are particularly comfortable working inside their favorite spreadsheet program, so we’ve created an easy way to use Microsoft Excel or Google Sheets to create new decision trees.

Once imported, the Zingtree editing and management tools can be used to refine and enhance your trees.

Here’s how our tutorial example appears in Google Sheets:

Details on this new feature:

Note that the same process for importing from Excel or Sheets can be used to import any tab delimited CSV file from any other program.

Other Updates

  • Update: Added ##ALL DATA## as a template for showing a summary of all data entry fields collected (h/t Sebastian, Logan). Details here.
  • Update: Added custom date range shortcut option to All Agents report. (h/t Allen J.).
  • Fix: Changing organization in All Agents report works properly now.
  • Fix: Restart function in older Zendesk Agent Scripting app installations now works properly again (Jamel).
  • Fix: Editing nodes from subtrees while using Preview now works properly (Jamel).
  • Update: Preview no longer automatically scrolls to the top of content.
  • Fix: Scoring uses numeric value of variables, not string value (Matt B.).
  • Update: All Agent report link added to My Agents page(Allen J.).
  • Update: Agent report now has quick date links.

Can we make your tree creating experience even easier? Just let us know!

Create Decision Trees using Google Sheets

sheets-blog

Did you know that Google Sheets can be used as a decision tree building tool? Using a specific layout, you can easily import any Sheets document into Zingtree, and turn it into a fully functional interactive decision tree.

Once you’ve successfully imported your tree, you can enhance it using Zingtree’s editing tools, which offer a lot more decision tree related functionality than Google Sheets.

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

You can get started now by copying this example and modifying it:

Get Examples from Google Sheets

 

Overview

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

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 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“.
  5. Column D is the question that is being asked. You can leave this blank if you want an answer node. The heading must be “Question“.
  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 labelled “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 C8 in the example):
    LINK: http://google.com
  • Example: To make a Tree Node that opens tree ID #123456789, the content area will be (see cell C7 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 TSV file. This is also known as tab-separated values, or tab delimited CSV.

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

Build Your Tree

To start, open this file in Sheets, and make a copy for your personal use. You can use the Basic or Advanced tab – most people start with the basic option.

Now start modifying it.  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 your work into Zingteee via copy and paste, or by exporting to a tab delimited (TSV) file.

Import via Copy and Paste

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

  1. In Sheets, 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 Google Sheets.) A screen like this appears:

  3. Choose Google Sheets 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 TSV 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 Sheets, go to File, Download As, and select Tab-separated values (.tsv, current sheet).

  2. In Zingtree, go to the Import File tool. (You can also get there from My Trees, Create Tree, and then choosing Import from Google Sheets.)

  3. If you want to overwrite an existing tree, select it via Replace Tree. Otherwise a new tree will be created.
  4. Click Import File, and locate the file you created in step 1.
  5. 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.