Updated August 15, 2018 with PDF Generation option
We’ve had several requests to create a final, single page document based upon answers to decision tree questions. Zingtree’s Document Nodes makes this powerful document generation capability a reality.
With the help of Document Nodes, you can now complete tasks like:
- Making custom sales brochures.
- Building legal agreements.
- Generating purchase orders.
- Creating evaluations and assessments.
For a simple example, examine the What Computing Device Do I Need? decision tree from the Zingtree Gallery.
You can also provide PDF files as a download option, or as a link to include in an email.
Document Nodes Overview
Document Nodes display the content from one or more content nodes on a single page, based upon variables and values. Variables can be from one of these sources:
- Data Entry field values.
- Scoring variables from button clicks.
- Variables set from Data Entry field list boxes or radio buttons.
- Variables introduced from calls to Webhooks.
- Merge Variables passed into the session.
Here’s how it looks in the Document Node editor:
Building a Tree to Generate a Document
To build a decision tree that generates a document based on answers selected, we recommend these steps:
- Create your question nodes, and assign Button Click Variables to important responses.
- Create content nodes (with no button options) for all of the possible snippets of content you’ll want to show in the final document.
- Create a document node that pulls everything together.
Set Up: How to Create a Document Node
Here’s how to create a fully-functional Document Node, step-by-step:
- From Overview, click Add Node.
- Select New Document Node.
- Add the pieces of content you want to serve to your end-users.
Each piece of content is set up like the image shown below. In this example, if the variable phone_calls equals “Yes”, we add the contents of node #6 to the final document.
Using the Document Node Editor
Drag this to reorder the content:
Click this to delete the content from the document node:
Pick a variable to test:
Pick an operation:
Pick a value to test against:
Edit the contents of the included node:
Show the contents of the included node:
Hint: Once the content a node is inserted in the document, it won’t be re-inserted again.
Continuing On After Creating a Document
You can add a “Next” button to the bottom of the document node, and have the end-user continue on to another node after viewing the generated document. Just configure your document node like you see here:
Use a node that shows your variables while you are testing. The What Computing Devices do I Need example tree uses Node #10 as an ending piece in the Document Node so you can see the value of all of your variables.
Making PDF Versions Available
You can provide PDF versions of a generated document in two ways:
- As a “Download PDF” button when the document node appears.
- As a document URL, uploaded to the Zingtree servers.
Please note that any PDF file generated is charged to you at $0.01 USD per 500 Kb.
Download PDF button option
Here’s how a document node can appear with a “Download PDF” button:
This can be configured in the Document Node editor like this:
Document URL option
The other option is to have Zingtree generate a PDF file, upload it to a server, and create a link to the PDF as a Zingtree variable. Here’s how that’s set up in the Document Node editor:
You need to do these three steps:
- Select Generate PDF File and Continue.
- Enter a PDF URL variable. This variable will contain the URL for your PDF file.
- Select a node to go to once the PDF has been generated.
In the above example, the variable pdf_url will contain the URL of the PDF file generated by this document node. See this article to learn how to make links in emails or content nodes to a PDF document URL.
Note that in this setup, the end-user will not see their document node until they open the PDF URL.
PDF hint: Pagination
If you want to force a page break, add ##PDF Page## anywhere in the content area of a node.
The What Computing Devices do I Need tree demonstrates a simple tree with a Document Node at the end. This tree helps an end-user decide whether they need a phone, tablet or desktop PC, based on the answers to some questions.
Have any questions, comments, or suggestions on this feature? Talk to us on live chat or by email!
This article was originally published on November 29, 2016 and updated on December 7, 2017.