Template Variable Data Overview

The template variable data manifest is a JSON file which outlines the variables used in the template.

Overview

When overlaying answers, using a default answer set or user context data, Advance uses the variable data manifest to ensure only the data requested in the template's interview is imported. This helps reduce file size and avoids retaining unnecessary data. 

You can also inspect or share the variable data manifest to help another author or integrator identify necessary variables, for example when mapping data across integrated systems.

Variable manifests are a feature supported in Author templates created in version 1.78 and later.

Features which rely on variable data for some of their functionality include:

  • Answer overlay: reuse data from one work item in another document.
  • Default answer set: a set of answers used across work items in a work group.
  • User context data: answers Advance can automatically pass into an interview based on the user's account details.

Obtaining a Template's Variable Data

Advance provides an endpoint for API users to retrieve the variable data of a the template package version. This endpoint returns a JSON response containing the variable data manifest.

Interpreting the Variable Data Manifest

The metadata at the top of the manifest provides information about the template itself, including the version of HotDocs Author used to create it, its name and description and the format of its output.

In the set of variables, each variable used in the template is listed according to name and type.  

Example Variable Data Manifest

{
  "manifestVersion": 1,
  "title": "Example Template",
  "fileName": "ExampleTemplate.docx",
  "templateId": "12345678-1234-1234-1234-123456789012",
  "description": "This is an example template.",
  "templateType": "docx",
  "productName": "Author",
  "productVersion": "1.94.0.0",
  "variables": [
    {
      "name": "TextVariable1",
      "type": "textVarType"
    },
    {
      "name": "TextVariable2",
      "type": "textVarType"
    },
    {
      "name": "NumberVariable1",
      "type": "numberVarType"
    },
    {
      "name": "DateVariable1",
      "type": "dateVarType"
    },
    {
      "name": "TrueFalseVariable1",
      "type": "trueFalseVarType"
    },
    {
      "name": "SingleSelectVariable1",
      "type": "singleSelectVarType",
      "selectOptions": [
        {
          "key": "Option1",
          "type": "Text"
        },
        {
          "key": "Option2",
          "type": "Text"
        },
        {
          "key": "Option3",
          "type": "Text"
        }
      ],
      "optionSource": "BUILTIN"
    },
    {
      "name": "MultiSelectVariable1",
      "type": "multiSelectVarType",
      "selectOptions": [
        {
          "key": "OptionA",
          "type": "TextList"
        },
        {
          "key": "OptionB",
          "type": "TextList"
        },
        {
          "key": "OptionC",
          "type": "TextList"
        }
      ],
      "optionSource": "BUILTIN"
    }
  ]
}