HotDocs Advance WorkflowUpload a template Manage user access to templates Work items Download assembled documents

User Context Data Overview

User context data are answers Advance can automatically pass into an interview based on the user's account details.

For example, user context data enables an interview to show or hide questions conditionally depending on the user's work group.

Overview

Advance stores useful information about users. This includes:

  • Personal details, such as their first name, last name, and email address
  • Data about their Advance account, such as the work groups they belong to
  • What kind of user they are, such as an external client

User context data makes this information available inside an interview, using user context variables. You can use these variables in your template to populate answers and tailor an interview to specific users. When a user opens an interview, Advance populates the user context variables with the user's data. Template authors can use user context data to tailor a template's interview to a user, for example by showing conditional sections or assembling auxiliary templates. 

Creating a Template Using User Context Variables

To use the user context data, you must have a template using the available user context variables. The following sections of the HotDocs Author documentation may help you create a template with user context variables:

Workflow

The template author, working in HotDocs Author version 1.78 or later, creates a template which uses the user context variables. These must match the name and variable type of the user context variables provided. The template author can add additional functionality, such as conditional regions, to the template as desired. When a user opens an interview for the template in Advance, Advance overlays the user context data as answers to the variables. If configured in the template, Advance can use these answers to present a tailored interview, for example showing conditional sets of questions or assembling auxiliary templates.

Advance ensures only the data asked for in the template's interview is imported. This helps reduce file size and avoids unnecessary data being retained.

If you use the Custom Interview event or the Load Interview event webhook to connect to an external data source, Advance sends user context data in the request.

List of available variables

When authoring a template, you can choose to add any of the following variables to your template. Advance will only populate the variables you add to the template. You must match the name and type of variable exactly.

User Context Variable Name Type Notes
ClientId String
ClientTitle String
ClientFirstName String
ClientLastName String
ClientEmailAddress String
ClientMobileNumberCountry Object

Contains the following properties: 

  • CountryId (int)
  • Name (string)
  • IsoCode (string)
  • CallingCode (string)
IsClientInterview Boolean Is the current interview a client interview.
LinkData String

If the interview is opened from an Advance template link, this answer is populated with the value of the link's LinkData property. See Passing Linked Data in a Template Link Query String for more information.

TemplatePackageId String The unique ID of the template in Advance.
TemplateName String The name of the HotDocs template used by the interview.
TemplateVersionNumber String The unique ID for a specific template version.
UserId String The unique ID of the user currently using the interview.
UserFirstName String The current user's first name.
UserLastName String The current user's last name.
UserEmailAddress String The current user's email address.
UserGroupIds String List The list of unique IDs of the user groups to which the current user has access.
UserGroupNames String List The names of the user groups to which the current user has access.
WorkItemName String The name of the work item for which the current user loaded the interview.
WorkItemId String The unique ID of the work item for which the current user loaded the interview.
WorkItemVersionId String The unique ID of the specific work item version from which the current user has loaded the interview.
WorkGroupId String The unique ID of the work group containing the work item being used by the current user.
WorkGroupName String The name of the work group containing the work item being used by the current user.
SiteMoniker String The unique identifying name of the Advance tenancy in which the current user has loaded the interview.

Common Reference Topics

Among others, the following reference topics may relate to this conceptual area: