Zingtree Tags: collecting data

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!

Form Fields: Decision Trees with Data Entry

blog-howto-2

One of the most requested features for Zingtree interactive decision trees is to have the ability to collect key customer information from users while they are navigating your tree. So, we made it happen!

With Zingtree’s data entry feature, you can do things like…

  • Add form fields to your trees (text, list boxes, check boxes, radio buttons, dates and numbers).
  • Include form data dynamically in other parts of the tree (i.e. you can ask for a name in the first node, and have that name appear in other parts of the tree).
  • Export form data into any other system, including Help Desk or CRM applications.

For example, your decision trees can gather data like this:

Example Tree

Try the Form Fields and Data Entry Demo tree from the gallery. This will ask you for some information, echo it in other parts of the tree, and finally inject it into a standard HTML form.

How to Include Data Entry Fields in your Tree

Here’s how to add a Data Entry field to a node:
  1. Edit a question node from Overview or Designer.
  2. Click Add next to Data Entry Fields.

  3. A new Data Entry field dialog appears.  Select the type of data you want to collect, and enter a variable name and a label which the end-user will see.

  4. Select Required to make this field require an entry before proceeding.
  5. For radio buttons and list boxes, you can enter the option choices as well. If you are using scoring nodes, you can enter a score variable, and a score to assign to each choice.

  6. Click Add Field when finished.

 

Inserting Form Field Data into Other Parts of the Tree

Once the end-user adds data to a form field and then clicks a button, this data can appear anywhere in the tree’s content, question or title areas. The trick is to use the variable name, surrounded by # characters. For example, after adding a text input field named name,  insert text like this into a node to show the value of name:

Hello #name#! Welcome back.

The #name# part will be replaced with whatever was entered previously into the name field.

Injecting Zingtree Form Data into Other Systems

Once your form fields are set up and your tree is running, the entered data can be injected into any other form.  Here’s how to do it:

  1. Make sure the variable names in your Zingtree form match the variable names on the form you want to inject data into.
  2. When opening the URL for the destination form, make sure to include &session_id=#session# in the link URL.
  3. In the destination form, include this piece of code:
    <script id="zingtree_field_id" value="session_data" src="//zingtree.com/api/zingtree.js">
    </script>

When the destination form is opened, it will include the data from the Zingtree session in the fields that match.

The Form Fields and Data Entry gallery tree shows a full example. Click all the way through, and you’ll see an HTML page with Zingtree forms data present.

Misc Notes

  • The form fields button in the editor is not available in Designer. You’ll need to use Overview, Edit Node to access it.
  • Tech note: If you’re hand-coding the HTML for your forms, each form element must have a class of zt-data to be recognized and saved.

Any questions? Reach out to us at any time.