Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.corti.ai/llms.txt

Use this file to discover all available pages before exploring further.

Use setInteractionOptions() for interaction-level defaults such as mode, spoken language, template defaults, personal templates, and document actions. When you set templates.defaultTemplate, it provides a fallback standard template for new sessions. It is 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.
setInteractionOptions() is a one-shot configuration for the embedded instance. Set it before the user starts or opens an interaction.
Use Configuration Scenarios for practical examples and Supported Values for supported languages and other lookup values.

Usage

await api.setInteractionOptions({
  mode: {
    fallback: "in-person",
    options: ["in-person", "virtual"],
  },
  spokenLanguage: {
    fallback: "da",
  },
  templates: {
    sources: {
      personal: {
        enabled: true,
      },
    },
    defaultTemplate: {
      behaviour: "fallback",
      template: {
        source: "standard",
        id: "corti-soap-en",
      },
    },
  },
  documents: {
    actions: {
      sync: false,
    },
  },
});

Prerequisites

  • User must be authenticated.

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.
  • templates.sources.personal.enabled: Must be a boolean when provided.
  • templates.defaultTemplate.behaviour: Must be "fallback" when provided.
  • templates.defaultTemplate.template.source: Must be "standard" for the legacy-compatible template mapping covered by this release.
  • templates.defaultTemplate.template.id: Must be a valid fully resolved template identifier when provided, for example "corti-soap-en".
  • documents.actions.sync: Must be a boolean when provided.

Possible errors

  • UNAUTHORIZED: User not authenticated.
  • INVALID_PAYLOAD: Invalid mode, language, template, or boolean value.
  • INTERNAL_ERROR: Failed to apply interaction options.

Returns

This method is documented as a configuration action and does not expose a response payload in the current public reference.