Documentation

telephony.call.attachTranscription

Scope: catalog Permissions to execute: for all

The method adds a call transcript.

Parameters

Parameter Description Type
CALL_ID Call ID string
COST Transcription price float
COST_CURRENCY Transcription price currency string
MESSAGES Call transcription. Array of TranscriptMessage objects.

TranscriptMessage class fields

Fields Description Type
SIDE Conversation participant. Possible values: User - account user, Client - external participant. string
START_TIME Start of phrase in seconds, counting from the conversation start. int
STOP_TIME Phrase end time in seconds, counting from the conversation start. int
MESSAGE Phrase text string

Example

var callId = '';
var messages = [
    {
        SIDE: "User",
        START_TIME: 1,
        STOP_TIME: 3,
        MESSAGE: "Hello, how can I help you"
    },
    {
        SIDE: "Client",
        START_TIME: 4,
        STOP_TIME: 8,
        MESSAGE: "Hello, do you sell vacuum cleaners?"
    },
    {
        SIDE: "User",
        START_TIME: 9,
        STOP_TIME: 11,
        MESSAGE: "Unfortunately, no"
    },
    {
        SIDE: "Client",
        START_TIME: 11,
        STOP_TIME: 13,
        MESSAGE: "Thanks, goodbye"
    },
    {
        SIDE: "User",
        START_TIME: 13,
        STOP_TIME: 15,
        MESSAGE: "Goodbye"
    },
];

BX24.callMethod(
    "telephony.call.attachTranscription", 
    {  
         CALL_ID: callId,
         MESSAGES: messages
    }, 
    function(response)
    {
        console.log(response.data())
    }
);


© «Bitrix24», 2001-2024