Generating Custom Documents Using Document Nodes

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 our What Computing Device Do I Need? decision tree from the Zingtree Gallery.

Document Nodes Overview

Document Nodes display the content from one or more answer 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.
  • Scoring variables set from Data Entry field list boxes or radio buttons.
  • Variables introduced from calls to Webhooks.

Here’s how it looks in the Document Node editor:

Note that scoring variables are a running total.  So if you set variable v to 1 in one place, and to 2 in another, the value of v will be 1+2 = 3.

Building a Tree to Generate a Document

To build a decision tree that generates a document based on answers selected, we recommend these steps:

  1. Create your question nodes, and assign variables to your responses.
  2. Create answer nodes for all of the possible snippets of content you’ll want to show in the final document.
  3. Create a document node.

Set Up: How to Create a Document Node

Here’s how to create a fully-functional Document Node, step-by-step:

  1. From Overview, click Add Node.
  2. Select New Document Node.
  3. 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:

Try the Document Node editor with a demo page here.

Hint: Once the content from an answer node is inserted, it won’t be 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:



Debugging Tip

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.

Live Example

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. 


  • J N says:

    Once a document is created via a document node, can it be saved as a pdf, downloaded, and/or emailed to the user?

    • Bill Zing says:

      Hi –

      Currently, the document will just display, but we may offer some form of download or email in the future.

      Track me down on our web site chat, and let me know more about what you are doing, and what sort of document download format will work best for you.


  • Tyler says:

    I also would like to be able to have “Print Document” , and “PDF Download” buttons on the document Nodes otherwise they don’t serve much purpose. Let me know if this is something you guys will be including.

    • Bill Zing says:

      You want these to appear for the end-user as they are using the tree?

      Let’s continue the conversation using the Chat button on, and we’ll come up with a solution for you.

  • Will says:

    Any update on the print/PDF functionality that can be incorporated in the Zingtree document node functionality?


    Is it possible to have a link in the generated document that sends it by email (not necessarily as a pdf)? Is that more do-able than making a pdf?
    I would just need a way for the end user to easily save / send the document.

  • R. Fielding says:

    I’d like to add my voice to the requests for the functionality for the end user of the tree to be able to save the node/output as a PDF or have it emailed to them

2 Trackbacks

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.