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


leaveInteraction

Leaves the call or chat. If the user is the only agent actively in the call, the call will be dropped. From here, the interaction will go into the After Call Work (ACW) state, which users need to complete. If the interactionId isn't specified, it will leave the active interaction. If ACW is not enabled for the service, the interaction will be completed after this method call.

Request

Syntax

leaveInteraction(interactionId?: string): Promise<OperationResult<null>>

Parameters

Parameter Parameter Values Data Type Optional/Required Description
interactionId String Optional The ID of the specific interaction that you wish to leave. If not specified, the active interaction will be used.

Example Request

    leaveInteractionButton.onclick = () => {

        const itemId = completeInteractionIdInput.value

        adApi.leaveInteraction(itemId)

    }

Return Value

null

< Previous | Next >