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


Leaves, sets notes and disposition for, and then completes the interaction in a single action. If the interactionId isn't specified, this method will leave and complete the currently active interaction. Note that this method may be used to replace the following sequence API calls: leaveInteraction, addNote, setDisposition, and completeInteraction.



leaveAndCompleteInteraction(disposition?: string, note?: string, interactionId?: string): Promise<OperationResult<null>>


Parameter Parameter Values Data Type Optional/Required Description
disposition String Optional The ID, code, or name of the disposition you want to select
note String Optional The note to be attached to the interaction
interactionId String Optional The ID of the specific interaction that you wish to leave and complete. If not specified, the active interaction will be used.

Example Request

    leaveAndCompleteInteractionButton.onclick = () => {

        const dispositionId = completeDispositionIdInput.value

        const note = completeNoteInput.value

        const itemId = completeInteractionIdInput.value

        adApi.leaveAndCompleteInteraction(dispositionId, note, itemId)


Return Value


< Previous | Next >