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.
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 Variables
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.