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


blindTransfer

Make a blind transfer of an active or specified interaction to another agent with a specified internal phone number.

Request

Syntax

blindTransfer(phone: string, customTransferData?: CustomTransferData, interactionId?: string): Promise<OperationResult<null>>

Where:

type CustomTransferData = Record<string, string | number | boolean | undefined | null>

Parameters

Parameter Parameter Values Data Type Optional/Required Description
phone Required The call center party’s internal phone number
customTransferData Optional You can define here any custom data to be transferred with interaction to the receiving party.
interactionId String Optional The ID of a transferring interaction. If not specified, the active interaction will be used.

Example Request

    blindTransferButton.onclick = () => {

        const phoneNumber = transferPhoneNumberInput.value

        const itemId = interactionIdInput.value

        let transferData: any | null = null

        try {

            transferData = JSON.parse(transferDataTextarea.value)

        } catch (e) {

            alert('You have syntax error in the transfer data structure. Cannot parse JSON.')

        }

        adApi.blindTransfer(phoneNumber, transferData, itemId)

    }

Return Value

null

< Previous | Next >