Improve Interview Speed Using a Custom Interview

Once you automate a template, you can use that template to generate an interview that displays the questions the user must answer in order to assemble a custom document based on that template.

It is important to understand how HotDocs generates both a default and a custom interview.

Generate a Default Interview

With default interviews,, HotDocs first scans the template and extracts all variables and instructions from the template. From this scan, HotDocs produces an "extracted script."

The example below shows a short template, followed by the corresponding extracted script:

(Template text)

Last Will of «Client Name»

I, «Client Name», being of sound mind, do make this my last will and testament. «IF Client Marital Status = "Married"»My «Client Spouse Gender: wife/husband»’s name is «Spouse Name». «Client Spouse Gender: she/he» is my personal representative. «ELSE IF Client Marital Status = "Never Married"»I have never been married. «END IF»

(Extracted script)

«Client Name»

«Client Name»

«IF Client Marital Status = "Married"»

«Client Spouse Gender: wife/husband»

«Spouse Name»

«Client Spouse Gender: She/He»

«ELSE IF Client Marital Status = "Never Married"»

«END IF»

Once HotDocs creates an extracted script, HotDocs processes the script and generates an interview, displaying any variables in the script as questions in the interview. (When a variable is linked to a dialog, HotDocs displays the dialog instead.) Additionally, HotDocs processes other instructions (for example, ASK, REPEAT, or IF instructions) included in the extracted script. While the extracted script may refer to a particular variable or instruction multiple times, once a user has answered the question corresponding to the variable or instruction, HotDocs does not ask that question again.

For most templates, allowing HotDocs to generate the interview this way is sufficient. In fact, HotDocs sets all templates, by default, to use this method.

Generate a Custom Interview

For complicated templates with lots of scripting, HotDocs' default interview generation can produce an interview that responds slowly to user interactions. This is because in default interviews, HotDocs must process every variable and instruction in the extracted script—no matter how many times they repeat, and even if the user has already answered the question or the instruction has already been executed. Depending on the complexity of the script, this may cause a delay when moving between answers in the dialog or between dialogs in the interview.

To avoid such issues, you can create a custom interview that contains only the required scripting and variables. You create this script using a computation variableA type of component that performs calculations or executes other instructions within the template. Computation variable scripts are created using the HotDocs scripting language.. The following example shows a custom interview script that might be created for the template already shown above:

(Custom interview script)

ASK Client Information

IF Client Marital Status = "Married"

ASK Spouse Name

END IF

Once you write the custom interview script, you must select a component file property to tell HotDocs to use your custom interview script instead of the default script.