HotDocs Answer Sets Overview

A HotDocs answer set is the output XML data produced by an assembly session.

Overview

An answer set is an XML document contain answer data. The answer data is the result of a completed assembly session. Answer data is generally gathered from end-users via a HotDocs interview. When you display a HotDocs interview to a user (using an assembly session for an existing work item), the user enters data into the interview. When the user finishes the interview, the interview submits the answer data back to Advance. The submitted answer data is then stored as part of the work item for which the assembly session was initialized.

If you download the submitted answer data from the work item, you can use this answer data again when making requests to the API or pass it to another system. This is useful if you want to:

You can also generate your own answer set. For example, by using data from your own database and generating XML that validates against the HotDocs answer set schema. This is often required when batch processing using the Advance API.

Work items, templates, and answer data

Every work item in Advance is linked to a specific template. When you complete an assembly session for the work item, it produces answer XML data based on the data in the current assembly session. The answer data submitted from the interview always maps to the fields in the template used during the assembly session.

To illustrate the connection between work items, templates, and the answer set, consider this example of creating a new work item in the Advance UI:

  1. In Advance you have a HotDocs template, Employee Contract.
  2. The Employee Contract template contains a text field, Employee Name.
  3. A user creates a new work item in Advance, Work Item A, that uses the Employee Contract template.
  4. Advance loads the interview for the new work item; this creates a new assembly session for the work item.
  5. In the interview for Work Item A, an Employee Name field is displayed to the user.
  6. The user types the value Beatrice Lopez into the Employee Name field.
  7. The user clicks the Finish button in the interview; this completes the assembly session and submits the interview answer data back to Advance.
  8. Advance saves the submitted interview answers as an answer set.
  9. If you download and open the answer set XML, you will see it contains:
    • A textAnswer element with the name Employee Name; and
    • Employee Name has a child element, value, containing the answer value Beatrice Lopez.

Common Tasks

Downloading Answer Sets from Existing Work Items

You can download the most recently-created answer XML for an existing work item using the following API request:

  • GET /WorkItems/{id}/AnswerFile/Content

See the API reference documentation for more information.

Validating HotDocs Answer Sets

Before you can use an answer set when making a request to the Advance API, you must first ensure the answer XML conforms to the HotDocs answer set schema.

See Validating a HotDocs Answer Set for more information.

Generating Answer Sets for Testing

If you need to generate an answer set for testing the API, you can use HotDocs Author to generate an answer file. Author answer files (.anx) are text files. You can open them in a text editor to view the answer XML.