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


onActivateInteractionScreen

This callback is used for receiving the CRM screen data that is associated with an active interaction (i.e., when it changes). The parameters of this callback include the object that you set for the last active interaction with the setInteractionActiveScreen method.

Request

Syntax

on('ON_ACTIVATE_INTERACTION_SCREEN', handler: OnActivateInteractionScreen): void


type OnActivateInteractionScreen = (screen: InteractionScreen, interactionId: string) => void


type InteractionScreen = Record<string, string | number | boolean | null | undefined>

Parameters

Parameter Parameter Values Data Type Optional/Required Description
screen String Required Any flat object data (i.e., not nested) that you added for the interaction with the setInteractionActiveScreen method
interactionId String Required The ID of the interaction, to which the provided object belongs

Example Request

function activeInteractionScreenHandler(screen: InteractionScreen, interactionId: string) {

const openedObjectId = screen.objectId;

openCRMObject({id: openedObjectId});

}

adApi.on("ON_ACTIVE_INTERACTION_SCREEN", activeInteractionScreenHandler);

Return Value

(None)

< Previous | Next >