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)
• 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
|
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)