Interface CaseAssistEngineConfiguration

The case assist engine configuration.

interface CaseAssistEngineConfiguration {
    accessToken: string;
    analytics?: AnalyticsConfiguration;
    caseAssistId: string;
    environment?: "dev" | "stg" | "hipaa" | "prod";
    locale?: string;
    name?: string;
    organizationId: string;
    preprocessRequest?: PreprocessRequest;
    proxyBaseUrl?: string;
    renewAccessToken?: () => Promise<string>;
    searchHub?: string;
}

Hierarchy (View Summary)

Properties

accessToken: string

The access token to use to authenticate requests against the Coveo Cloud endpoints. Typically, this will be an API key or search token that grants the privileges to execute queries and push usage analytics data in the target Coveo Cloud organization.

Allows configuring options related to analytics.

caseAssistId: string

Specifies the unique identifier of the target case assist configuration. See Retrieving a Case Assist ID.

environment?: "dev" | "stg" | "hipaa" | "prod"

The environment in which the organization is hosted.

The dev and stg environments are only available internally for Coveo employees (e.g., Professional Services).

Defaults to prod.

locale?: string

The locale of the current user. Must comply with IETF’s BCP 47 definition.

Notes: Coveo Machine Learning models use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the $locale object.

name?: string

The Engine name (e.g., myEngine). Specifying your Engine name will help in debugging when using an application with multiple Redux stores.

'coveo-headless'
organizationId: string

The unique identifier of the target Coveo Cloud organization (e.g., mycoveocloudorganizationg8tp8wu3)

preprocessRequest?: PreprocessRequest

Allows for augmenting a Platform request before it is sent.

Request to be augmented

The origin of the client, can be "analyticsFetch", "analyticsBeacon" or "searchApiFetch"

Augmented request

proxyBaseUrl?: string

The base URL to use to proxy Coveo case assist requests (e.g., https://example.com/case-assist).

This is an advanced option that you should only set if you need to proxy Coveo case assist requests through your own server. In most cases, you should not set this option.

See Headless proxy: Case Assist.

renewAccessToken?: () => Promise<string>

A function that fetches a new access token. The function must return a Promise that resolves to a string (the new access token).

searchHub?: string

The first level of origin of the request, typically the identifier of the graphical case assist interface from which the request originates. This value is used for analytics reporting purposes.