setInteractionOptions() for interaction-level defaults such as mode, spoken language, template defaults, personal templates, standard templates, project templates, inline templates, template editor sections, and document actions.
When you set templates.defaultTemplate, it can provide a fallback template for
new sessions or force the first generated document to use a specific template.
Fallback templates are used only when the user does not already have their own
default template set.
Applies to Web Component, Window API, and PostMessage. Examples on this page
use the Web Component API shape.
Set interaction options before the user starts or opens an interaction.
Usage
Prerequisites
- User must be authenticated.
Defaults and omitted values
setInteractionOptions() applies only the option slices you provide. When you omit an option, the embedded Assistant does not apply an override for that setting and keeps the current or product default behavior.
Inline templates are available only to the embedded instance that receives the payload. Use an id when another option, such as templates.defaultTemplate, needs to reference the inline template.
For personal template section fields, the default editor behavior is:
Use
visible: true to show a prompt field. Use editable: false to make a visible field read-only.
Template editor section sources
Usetemplates.sectionSources to control the sections offered by Add section in the Guided Document Generation template editor. templates.sources controls which complete templates are available. Configure the two independently.
All fields below are optional. Paths are relative to templates.sectionSources.
Standard section filters do not filter project sections. Standard sections support
include only. Project sections support both include and exclude by section UUID.
Without section source overrides, both sources are enabled with no filters. Partial updates preserve omitted fields, including fields in the other source. For example, setting standard.include.families preserves an earlier project.enabled value. Send [] to clear a list filter; use enabled: false to hide an entire source.
Region and language behavior
For each standard section family, the picker prefers variants matching a configured region. If none match, it prefers variants without a region. If neither exists, it keeps variants from other regions. A region filter therefore does not guarantee that every section has that region. Region selection also narrows the template editor’s language choices withindocuments.allowedLanguages, or within the supported languages when that option is omitted. With the default supported languages, DK offers Danish, BE offers German, French, and Dutch, and CA offers British English, American English, and French.
If no languages match the regions, the editor keeps its otherwise available language choices. A single available language disables the language dropdown. Setting standard.enabled: false disables this region-based language filtering.
See Template editor section sources for configuration examples.
Validation and warnings
Boolean fields must be booleans. Filter lists must contain non-empty strings. Corti Assistant trims list values, removes duplicates, and normalizes valid regions to alpha-3 codes. Invalid region codes and malformed project section UUIDs are skipped. Valid remaining values still apply. If no valid values remain in a region or UUID list, that list does not restrict the picker. Corti Assistant reports skipped values throughembedded.interactionOptionsWarning. The warning payload adds these fields under skippedValues.templates.sectionSources:
For accounts using legacy templates, both section source blocks are ignored. Section family names are normalized but are not checked against a catalog. An unknown family can produce an empty standard section list without a warning.
Input validation
mode.fallback: Must be either"in-person"or"virtual".mode.options: Must contain one or both of"in-person"and"virtual".spokenLanguage.fallback: Must be a valid language code when provided.spokenLanguage.options: Must be an array of valid language codes when provided. If you provide bothfallbackandoptions,fallbackshould be one of the listed options.templates.sources.personal.enabled: Must be a boolean when provided.templates.sources.personal.sectionFields: Optional object controlling field-level access in the guided template editor.headinganddescriptionaccept an optional{ editable?: boolean }object.miscPromptandoutputSchemaaccept an optional{ visible?: boolean; editable?: boolean }object.templates.sources.standard.enabled: Must be a boolean when provided.templates.sources.standard.include.regions: Must be an array of ISO 3166-1 alpha-3 template region codes when provided.templates.sources.standard.include.families: Must be an array of standard template family identifiers when provided.templates.sources.standard.exclude.regions: Must be an array of ISO 3166-1 alpha-3 template region codes when provided.templates.sources.standard.exclude.families: Must be an array of standard template family identifiers when provided.templates.sources.project.enabled: Must be a boolean when provided.templates.sources.project.include.ids: Must be an array of project template UUID strings when provided.templates.sources.project.exclude.ids: Must be an array of project template UUID strings when provided.templates.sources.inline.enabled: Must be a boolean when provided.templates.sources.inline.templates: Must be an array of inline template objects when provided. Inline template IDs only need to be unique within the currentsetInteractionOptions()payload and are required only when referenced by another option.templates.defaultTemplate.behaviour: Must be"fallback"or"force-first-document"when provided.templates.defaultTemplate.template.source: Must be"standard","project", or"inline"when provided.templates.defaultTemplate.template.id: Must be a valid template identifier for the selected source when provided. Standard and project templates use UUIDs; inline templates use the local inline template ID.templates.defaultTemplate.allowUserSelection: Must be a boolean when provided. Set it tofalseto hide user controls for selecting and persisting a default template.documents.actions.sync: Must be a boolean when provided.documents.allowedLanguages: Must be an array of valid BCP 47 locale codes when provided. Region-less codes (e.g.,"en","da") are recommended; region variants (e.g.,"en-US") are supported if the region-less code does not provide your desired results.documents.maxGenerated: Must be a number or"unlimited"when provided.0is treated as unlimited.
Possible errors
UNAUTHORIZED: User not authenticated.INVALID_PAYLOAD: Invalid mode, language, template, or boolean value.INTERNAL_ERROR: Failed to apply interaction options.