Getting Unanswered Interview Variables

You can get the unanswered variables in interview templates using the HotDocs Advance API. This enables you to retrieve the variables that a user has chosen not to answer.

This is useful as it enables you to decide how to handle your work item. For example, if Advance returns your assembled documents with all variables answered, you may decide to change the workflow status to Complete. If Advance returns your assembled documents with unanswered variables, you may decide to set the workflow status to Rejected and begin a new version of the work item.

To get unanswered interview variables

To get unanswered interview variables, you must use the following endpoint:

GET /WorkItems/{workItemId}/Documents/{documentId} 

Metadata Sent from Advance to your Endpoint

Any unanswered variables from an assembled document display in the metadata under assemblyResult's unanswered variables of the JSON response.

Example JSON Response Data

    "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6 ",
    "assembleOrder": "0",
    "name": "string",
    "fileName": "string",
    "mimeType": "Word",
    "createdDate": "2023-04-03T09:55:53.821Z",
    "assemblySessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "hasContent": "true",
    "uploadedById": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "isPostProcessed": true,
    "isHidden": true,
    "assemblyResults": {
          "unansweredVariables": [

If all interview variables are answered, the allReferencedVariablesAnswered property will return a value of true

If you attempt to retrieve unanswered variables from documents assembled in versions of HotDocs Advance prior to 1.31.1, the AssemblyResult's will return a value of null.

Related Topics