From Bright Pattern Documentation
< 5.19:AgentDesktop-client-side-javascript-api-specification
Revision as of 04:01, 29 May 2024 by BpDeeplTranslateMaintenance (talk | contribs) (Updated via BpDeleteTranslateTags script)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
• 5.19


onActiveInteractionSwitch

This handler is invoked when the active interaction in the Agent Desktop application switches from one active interaction to another active interaction.

Request

Syntax

on('ON_ACTIVE_INTERACTION_SWITCHED', handler: OnActiveInteractionSwitchHandler): void

type OnActiveInteractionSwitchHandler = (activatedInteractionId: string | null) => void

Parameters

Parameter Parameter Values Data Type Optional/Required Description
activatedInteractionId String

null

Required The ID of the currently activated interaction.

Note that the type can be null if there is a completed interaction, and the system recognizes there is no longer an active interaction.

Example Request

const activeInteractionId: string | null = null;

function interactionSwitchedCallback(newId: string | null) {

activeInteractionId = newId;

}

adApi.on("ON_ACTIVE_INTERACTION_SWITCHED", interactionSwitchedCallback);

Return Value

(None)

< Previous | Next >