Newer Version Available

This content describes an older version of this product. View Latest

Update VoiceCall

Updates the VoiceCall after the call has ended. Use this API to update call-related parameters that are unavailable during the VoiceCall creation stage.

The Update VoiceCall API is an asynchronous operation. You can’t query for the status of the API call.

This endpoint is available in API version 49.0 and later.

In API version 50.0 and later, this endpoint can be used to create a VoiceCall even after the call has ended. This behavior is useful in scenarios where you want to log a record in Salesforce for abandoned or missed calls, or for any other scenario where a VoiceCall was not already created.

URI
/telephony/v1/voiceCalls/{CALL_ID}
Formats
JSON, XML
HTTP Methods
PATCH
Authentication
Authorization: Bearer token
Parameters
Property Name Type Description Required
startTime string Start time of the VoiceCall. No
endTime string End time of VoiceCall. No
enqueueTime string Time the call was placed in queue. No
acceptTime string Time when agent accepted the call. No
fromNumber string The number from which the call was made. For example, for an inbound call this value is the End User’s phone number. No
totalHoldDuration int32 Total time the agent put the call on hold. No
longestHoldDuration int32 Within the entire call, the longest duration the agent put the call on hold. No
numberOfHolds int32 Total number of holds within the entire call. No
queue string Name of the queue that the agent who serviced the call belonged to. No
agent string Agent username. No
agentInteractionDuration int32 Total duration of the agent interaction. No
recordingLocation string Location of the call recording if call recording was enabled. No
callAttributes string This field allows you to pass custom fields on a VoiceCall that must be populated as part of creation process. This value is a string representation of a JSON object containing key value pairs. Each key value pair corresponds to a custom field and its value. No
Example
Request:
1PATCH /telephony/v1/voiceCalls/0LQRM0000006CSz
2
3{
4  "startTime": "2020-08-26T21:21:14Z",
5  "endTime": "2019-08-26T21:21:34Z",
6  "enqueueTime": "2019-08-26T21:21:34Z",
7  "acceptTime": "2019-08-26T21:21:24Z",
8  "numberOfHolds": 20,
9  "longestHoldDuration": 10,
10  "callAttributes": "{\"dateCustomField__c\": \"2019-08-28T21:21:34Z\", \"checkbox__c\": false}"
11}
Response:
1{
2  "status": "pending"
3}