Document Assembly is the HotDocs process that produces an assembled document by processing HotDocs instructions and replacing placeholder fields in the template with answer data. For example, document assembly is a background process that runs when your template users finish an interview on HotDocs Hub and when you finish testing a template in Author.
In this topic Hide
Although document assembly is a background process that runs at the end of an interview, it is central to the purpose of HotDocs Advance; creating an assembled document containing answers typed by a template user. Document assembly is the "engine" that produces the final document and understanding how it works and some of the technical aspects of document assembly can help you when authoring a template and managing your templates. For example, when HotDocs assembles a document, it processes the template in a specific order, which directly affects the order of questions in a Default interview.
Among others, document assembly enables you to perform the following common tasks:
In HotDocs Author, you can assemble a document when testing a template. You can test a DOCX template from the Author tab of the Word ribbon, and in the Template group, clicking Test. You will then see the Test Interview Window, which will present you with the interview questions either in the assembly order or the order you specified in a custom interview computation. As you answer interview questions, they are placed into the answer file. When you complete the interview and click Finish, the document assembly process begins in the background. The document assembly process takes the answers from the answer file, replaces the placeholder fields in the template, and when completed, enables you to download the assembled document.
The assembly order is the sequence in which variables and fields of the template are processed during assembly and is relevant when you consider the default interview workflow (as opposed to using a custom interview computation) as it controls the order of the questions in the interview. The assembly order can be generally described as starting at the top left corner of the template and finishing at the bottom-right corner. For example, the first question that a template user will see is the one represented by the HotDocs field in the upper and left most corner of your template, the second question presented is the field to its right, and so on.
When you create a template in Word you can place HotDocs fields in the main body of the text, headers, footers, text boxes, comments, footnotes and endnotes. When HotDocs uses the template to assemble a document, it processes the fields in the main body top to bottom and left to right (just as you would read a page of text). If you include HotDocs fields in any other areas HotDocs processes them in the following order:
If headers and footers are defined separately then HotDocs processes them in the following order: