Zingtree makes extensive use of variables to store data collected or passed into the tree.
How to Assign Variables
You can set variables in a variety of ways:
- Passed into the tree via the URL using Merge Variables.
- Assigned via Data Entry Fields.
- Assigned as Button Click Variables.
- Added to the session using a Webhook.
- Using optional built-in special tree variables (like IP address, location, last tree visited, last node visited, and more).
- Passed in using our apps for Zendesk, Salesforce, or Freshdesk.
Variable Names: Allowed Characters
- Variable names may contain letters, numbers, underscores (_), and dash (-) characters only. Variable names may not start with a number.
- When data is imported from external sources such as data connectors, any invalid character is replaced with an underscore (_).
Using Variables
Within Zingtee, you can add intelligence to your decision trees using variables in the following ways:
- Branch automatically to a node using a Logic Node.
- Generating a custom document based upon variables via a Document Node.
Displaying Values of Variables Within a Node
Any variable can be displayed in the node title, question or content area by surrounding the variable name with hashtags. For example, enter #name# to display the variable name.
You can do the same in email nodes as well. So in the "To: field of an email node, entering #email# will substitute the value of the email variable.
If you want to see ALL variables collected so far, enter ##ALL DATA## into the content area of any node.
Modifying and Erasing Variables
- If you want a text variable converted to lowercase automatically, add a _lc suffix to the end of the variable. So a variable named model_lc assigned as "Ford F150" will be converted to "ford f150".
- You can do math operations on numeric variables, using Zingtree Math.
- Text variables can be joined using a string catenation webhook we provide.
- You can erase variables by overwriting them or setting a Data Retention Policy.
- You can maintain a running total for numeric variables. This is useful for evaluations or testing.
Display a Reference List of all Variables
You can reference a list of variables used in individual trees or across your Organization.
To see a list of all of the variables present in a single tree:
- Open the tree for which you'd like to see a list of variables used
- From the Information menu, choose Variables:
- The Variables window displays a list of all the variables used, including the type of node and the node number. Clicking on the node number takes you directly to the editor for that node:
- Click the link at the bottom to view a list of all variables present across all trees in the organization. Or follow the process below.
To see a list of all of the variables present across all trees in an organization:
- From the My Trees page, choose Variables from the left sidebar menu:
- The list can be filtered by variable name, tree name or tree ID.
- The list can be exported to a CSV file.
- Click on the Tree Name or Tree ID to edit the tree where the variable exists.
- Click on the Node number to edit the node where the variable exists.