From Bright Pattern Documentation
• 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)