Recipe: Assembling a Document Using an Interview
This page provides a step-by-step guide on how to assemble a document based on the information entered by a user during an interview.
Step 1 - Create a work item
All documents in HotDocs Advance start with a work item. A work item is a named location in HotDocs Advance where you choose a template, enter and edit answer data, and assemble documents from that template and answer data.
See: Creating a work item
Step 2 - Create a new work item version
Before you can gather data, you must create a new version of your work item. This begins an assembly session, which is a distinct instance of the document assembly process for a work item.
See: Creating a new work item version
Step 3 - Display an interview
To collect data from your template users, you can present an interview to them. An interview is a set of questions that are generated by HotDocs based on the variables and dialogs defined in your template. After receiving a response from the create new work item version request you can use the Core Assembly Service JavaScript API to embed the interview into a web page.
Step 4 - Complete the work item version
To generate documents, you need to complete your work item version. When you complete the version, Advance processes the data it has gathered and creates the new version, including the assembled documents and the new answer set.
See: Completing a work item version
Step 5 - Download assembled documents
After completing a work item version, you can query the API for the assembled documents, then download the assembled documents by handling the response stream.