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


setPhoneDevice

Selects a specific phone device and sets a phone number, if needed.

Request

Syntax

setPhoneDevice(phoneDevice: PhoneDeviceData): Promise<OperationResult<null>>

Where:

type PhoneDeviceData = {

    type: PhoneDevice

    phone?: string

}

Parameters

Parameters Parameter Values Data Type Optional/Required Description
PhoneDeviceData
type String Required Allows you to select one of the available PhoneDevice types (i.e., as defined in the method getPhoneDevicesList)
phone String Optional Allows you to define a phone number for the selected phone device type.


Example Request

setPhoneDeviceButton.onclick = () => {

    adApi.setPhoneDevice({

        type: phoneDeviceTypeInput.value as any,

        phone: phoneDeviceNumberInput.value,

    })

}

Return Value

null

< Previous | Next >