Document generation connections and models

Document generation utilizes the Documents connection and the associated document actions to generate a document. There are several ways you can generate a document using these actions, with the most common way adding a button to a page that is used to generate a document through an action flow. Think of it like a workflow that automatically happens behind the scenes, generally without much input from the your or the user generating document.

Generating a document from a page requires the use of the Documents connection. The Documents connection contains:

  • Three document actions:

    • Generate Document

    • Download

    • Wait until Generated

  • Two models:

    • DocGen Instance (List)

    • DocGen Instance (Detail)

Document connections and models

Document connections and objects have been added as available models when creating a new page or adding a button to an existing page.

Please reference the following topics for more information on models and data connections and how they are used when designing a page:

Available Connections

Documents

For document generation a connection type is available called Documents. The Documents connection is used for:

  • Adding one or more of the available document generation actions

  • Adding a new document model to a page

Note: The Documents connection is managed connection through Nintex and is not considered an External connection. The Documents connection cannot be modified.

Available Models

DocGen Instance (List)

When selecting Documents as a connection, when adding a model to a page, the DocGen Instance (List) option becomes available as a data object. The DocGen Instance (List) contains the following object fields:

  • Id

  • startDate

  • endDate

  • packageName

  • status

This object type is useful for creating a list of generated documents in a table, and adding a run action for downloading the document based off of the Id. For a scenario using this object field refer to Advanced document generation using DocGen actions.

DocGen Instance (Detail)

When selecting Documents as a connection, when adding a model to a page, the DocGen Instance (Detail) option becomes available as a data object. The DocGen Instance (Detail) contains the following object fields:

  • Id

  • startDate

  • error

  • errorId

  • status

Document generation actions and their associated behaviors

To use document generation features you will need to understand how to get the basic document actions set up. Each document action requires additional settings to be configured in the Settings menu.

There are three document actions available:

  • Generate Document: Generates and downloads the document all in one action. Good for simple scenarios where a user needs to generate a document such as an invoice, contract, or NDA. This is the most common action to use as it is highly configurable and is the quickest action to get set up and running. The most common use of the Generate Document action is through the use of a "Generate Document" button added to a page. For more information on how to use the Generate Document action refer to Add document generation action to page.

  • Download Document: Asynchronously downloads the document based off of a DocGen instance ID. The most common use of this button is through a "Download" button added to a page, most likely contained within a table containing a list of generated documents.

  • Wait Until Generated: Asynchronously runs a document generation based off of a DocGen instance ID, but waits for user input to download the document. This action is useful for workflows that require user input or action, either to confirm an action or review an item in the workflow.

    Important: Documents generated are stored temporarily, only for 24 hours. This allows for enough time for you to download the document and save it to another storage location, such as Box.

How you decide to use the above actions is going to largely depend on how you want the document generate action when a user goes to generate a document. Once these actions have been selected there are several options that can then be set in the Settings menu.

The above screen shot shows the Settings menu displayed for the Generate Document action.

Document action reference tables

Use the reference table below for reference on each action and fields associated with that action.