From Bright Pattern Documentation
< 5.19:AgentDesktop-client-side-javascript-api-specification
Revision as of 04:01, 29 May 2024 by BpDeeplTranslateMaintenance (talk | contribs) (Updated via BpDeleteTranslateTags script)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
• 5.19


inviteToCallConference

Adds another party to the call. It will create a conference call if the user is on an active two-party call before this method is invoked.

Request

Syntax

inviteToCallConference(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 String Required The internal or external phone of another party that you plan to add to the conference call.
customTransferData Various Optional You can send any custom data to be transferred with the interaction to the receiving party (i.e., the Record is a key-value pairs container)
interactionId String Optional The ID of the main call, where you want to add a new party. If not specified, the active interaction will be used.

Example Request

    inviteToCallConferenceButton.onclick = () => {

        const phoneNumber = conferencePhoneNumberInput.value

        let transferData: any | null = null

        try {

            transferData = JSON.parse(conferenceTransferDataTextarea.value)

        } catch (e) {

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

        }

        const itemId = conferenceInteractionIdInput.value

        adApi.inviteToCallConference(phoneNumber, transferData, itemId)

    }

Return Value

null

< Previous | Next >