From Bright Pattern Documentation
Jump to: navigation, search
This page contains changes which are not marked for translation.
• 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 >