From Bright Pattern Documentation
Jump to: navigation, search
• 5.19


Sends to the Agent Desktop application the selected options(s) from the associated activity history object that the agent wants to link with the specified interaction. Agents will be able to select the associated object(s) in the Agent Desktop Communicator Widget v2 user interface, and the result will be sent in the data for the onInteractionRemoved callback.



addInteractionAssociatedObject(object: InteractionAssociatedObject, interactionId?: string): Promise<OperationResult<null>>


type InteractionAssociatedObject = {

    id: string

    type: string

    displayName: string

    displayType: string

    customFields: Record<string, string>



Parameter Parameter Values Data Type Optional/Required Description
id String Required The object’s unique ID
type String Required The type of object  (e.g., contact, case, task, etc.)
displayName String Required The object’s display name
displayType String Required The object’s display type
customFields Record<string, string> Optional Any additional information that you want to provide about the object
interactionId String Optional The ID of the interaction you want to set as active

Example Request

    addInteractionAssociatedObjectButton.onclick = () => {

        let associatedObject: InteractionAssociatedObject | null = null

        try {

            associatedObject = JSON.parse(activeAssociatedObjectTextarea.value)

        } catch (e) {

            alert('You have syntax error in the associated object structure. Cannot parse JSON.')


        if (!associatedObject) {



        const itemId = activeAssociatedInteractionIdInput.value

        adApi.addInteractionAssociatedObject(associatedObject, itemId)


Return Value


< Previous | Next >