Integrations Overview

To integrate your web application with the HotDocs Core Assembly Service, consider the following workflow:

Lowell has stated that this information should link out to the relevant API docs.

  1. Use the REST API to create an assembly session. You provide:
    • A template ID (required)
    • Some answer data (optional)
    • Other assembly session options
  2. If you want to present an interview, embed the interview in a web page (so your users can see and interact with it) by calling HD$.AttachSession. This "attaches" an interview in the browser to the session you created on the server.
  3. When the user completes the interview, the session assembles all the appropriate documents, based on the data gathered. (If no interverview was requested, the documents are generated immediately based on whatever answer data you provided.
  4. Once the session is complete, you use the REST API to retrieve the documents and answer data produced.

Need to re-purpose and edit the content here

The HotDocs Core Assembly Service API supports a subset of the assembly options you could formerly set using the HotDocs Server Management Console or the HotDocs Cloud Services Subscriber Portal. This document describes the assembly sessions options you can set when using the HotDocs Core assembly service to assemble a document from a HotDocs 11 template.

In HotDocs Server, you configure assembly session settings using the HotDocs Server Management Console

Default UTC Offset

Lowell note - this section is general and NOT HD11 specific, it should be put in some sort of "create an assembly session topic"

When you create an assembly session using the Assembly Service API, especially if you do not plan on presenting an interview, you should specify a "Default UTC Offset" option for that session. HotDocs then stores that offset as part of the metadata for that session. Then, when the interview runs, part of the data that HotDocs sends and receives to the template user's browser includes (just as with HotDocs 11) a UTC offset that the end user's browser can detect. The browser can then respond with a UTC offset specific to the browser's local time zone. The assembly session can then detect and remember the UTC offset from the user's browser. The Core Assembly Service can then use the browser's offset to override the offset you specified in the interview session options.

Later, during assembly, HotDocs uses the remembered timezone offset (whether the default offset built into the software,– which is the time zone local to the server, or the default you specified when you created the assembly session, or the value detected by the interview user's browser) to inform the template of the appropriate calendar day.

supply a value to the built-in TODAY function so the TODAY function behaves as the interviewee would expect.

Assembly Session Options for HotDocs 11 Templates Supported in HotDocs Core

The following assembly session options for assembling HotDocs 11 templates are supported by the HotDocs Core Assembly Service. Specifying values for these settings affects the behavior of the HotDocs 11 assembly, as follows:

Option What it Does
Default Date Format

These options are cloud only, in on-prem, you set this in management console

Enables you to tell HotDocs how to format dates in the assembled document if the template author did not assign a format to a date.

This option only controls how HotDocs 11 formats dates in assembled documents; it does not control how HotDocs 11 displays dates in the interview or how Author templates behave at all.

Date Order (MDY vs. DMY) Enables you to set the default date order to either DMY (Day Month Year) or MDY (Month Day Year) in cases where the template author was ambiguous about their intent.
Assembly Locale Enables you to set the language/locale codes that tell HotDocs to spell out numeric values. Acceptable values combine a two-letter language code with a regional code; if you do not specify a value, HotDocs applies the default "en-US" (US English) value.
Interview Locale Enables you to set the language/locale codes that tell HotDocs how to format dates and numbers when presenting the interview. Acceptable values combine a two-letter language code with a regional code; if you do not specify a value, the interview attempts to detect the locale settings in the template user's browser.
Request Timeout Eventually, assembly of Author templates will support this option. Enables you to assign a time out period that prevents the assembly service from waiting indefinitely for an assembly to complete. By default, the assembly times out at 120 seconds.
Markup View Eventually, assembly of Author templates will support this option. Enables you to tell HotDocs whether or not to assemble the document in Markup View.
Default UTC Offset

also move to general asm topic

Enables you to set the date and time (in UTC) of the assembly session request, formatted according to RFC 1123.
Default Text Enabled you to override the Unanswered Format the template author specified in the Template Properties dialog box.

As usual with assembly session options, if you do not set any of these options, HD11 template assembly uses the defaults coded into the software.

Other Interview Options

In addition to the options outlined in the table above, you can also set other options in the assembly service that are specific to interviews. For example, you set options that govern showing or hiding an interview outline, resource buttons, answer summaries, etc. However, rather than using the HotDocs Server Management Console, you specify those settings from the interview host page in the InterviewOptions object that is the third parameter to the JavaScript call to HD$.AttachSession().

Assembly Session Options for HotDocs 11 Templates NOT Supported in HotDocs Core

The following options (which are available for On Premises solutions when changing server configuration settings using the HotDocs Server Management Console, or for Cloud Solutions using the HotDocs Server API) are NOT available when you assemble documents from HotDocs 11 templates using the Core Assembly Service:

Option What it Did
Interview Format Enabled you to choose whether to present your interview in JavaScript or Silverlight (the Core Assembly Service only supports JavaScript interviews).
Template Title Override Enabled you to hide the template title (which you cannot truly override, since it forms part of the template).
Honor Component File Unanswered Format Enabled you to override the Unanswered Format the template author specified in the Template Properties dialog box or the component's properties available in the appropriate component editor and stored in the component file.
Maximum While Iterations Enabled you to override the maximum number of iterations allowed for a given WHILE loop the template author specified in component file properties. The Core Assembly Service now honors the limits the template author specified, subject to maximums built into the software itself.
Maximum Recursion Depth Enabled you to override the depth of the number of recursions the template author specified in the component file properties. The Core Assembly Service now honors the limits the template author speficied , subject to maximums built into the software itself.