Zingtree makes extensive use of variables to store data collected or passed into the workflow.
How to Assign Variables
You can set variables in a variety of ways:
- Passed into the workflow 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 workflow variables (like IP address, location, last workflow 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 workflows 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 HTML in Variables
Variable values can include HTML. When a value is displayed in a node, any formatting it contains (such as bold text, links, or line breaks) is rendered. Zingtree automatically removes any potentially unsafe code prior to rendering, while leaving all formatting intact. This does not change the variable value within the session data, it only sanitizes for rendering.
To display variable values exactly as entered, with no HTML rendered, enable the Render variable content as plain text in your Workflow's Settings > Rendering tab. Any HTML in a value will then be shown as written rather than formatted.
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 workflows or across your Organization.
To see a list of all of the variables present in a single workflow:
- Open the workflow 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 workflows in the organization. Or follow the process below.
To see a list of all of the variables present across all workflows in an organization:
- From the My Workflows page, choose Variables from the left sidebar menu:
- The list can be filtered by variable name, workflow name or workflow ID.
- The list can be exported to a CSV file.
- Click on the Workflow Name or Workflow ID to edit the workflow where the variable exists.
- Click on the Node number to edit the node where the variable exists.