Newer Version Available
Create a Voice Call Record
When you create a voice call record, it creates a conversation in Salesforce. Only use this API in real time, which means that you should invoke this API only when a call is initiated.
This API can also be used to create voice call records for transfer by including the parentVoiceCallId parameter in the request payload.
URI
/telephony/v1/voiceCalls
HTTP Method
POST
Headers
- Authorization: Bearer <token>
-
String. Standard header. The authorization token, where <token> is the JSON Web Token (JWT). Required.
- Content-Type: <format>
- String. Standard header. The format of the request body. Valid formats include JSON and XML. For example, application/json or application/xml. Required.
- Telephony-Provider-Name: <telephony provider name>
- String. Custom header. The name of the telephony provider that calls this API. For example, Amazon Connect.
Parameters
| Property Name | Type | Description | Required |
|---|---|---|---|
| callCenterApiName | string | The API name of the contact center created in Salesforce associated with the voice call record. | Yes |
| parentVoiceCallId | string | For transfers, set this value to a Salesforce Voice Call record ID or the
voice call’s vendor call key (vendorCallKey)
representing the parent record to this newly created voice call record. This
parameter is required if initiationMethod=transfer Only use this property to create voice call records for transfer. Don’t include this property when creating the initial voice call record. |
No |
| vendorCallKey | string | A unique key that identifies the voice call record within the telephony
system. For example, if the telephony system is Amazon Connect, this value is the
contact ID in Amazon Connect. If another voice call record with the same vendor call key already exists, a new voice call record won’t be created. Instead, Salesforce returns the Salesforce voice call ID of the existing voice call record with this vendor call key. |
Yes |
| to | string | The phone number to where the voice call is made. For inbound calls and transfers, set this value to the contact center’s phone number. | Yes |
| from | string | The phone number from where the voice call is made or transferred.
|
Yes |
| callOrigin | string | Information about how this call originated. Possible values are:
|
No |
| initiationMethod | string | The initiation method of the voice call. Possible values are:
|
Yes |
| queue | string |
Optional queue ID to associate with this voice call. This parameter is only used when initiationMethod is set to Transfer. It’s ignored for other initiation methods. You can pass in either the Salesforce queue object ID or the vendor’s external queue ID. Salesforce resolves this value using the entries in the CallCenterRoutingMap record. If the queue is resolved to a valid Salesforce queue, the VoiceCall owner is changed to the queue and the supervisor is able to see the transferred call waiting in the queue. See Map Your Salesforce Queues to Telephony Provider Queues. |
No |
| startTime | string | The date and time (in UTC) when the voice call started. | Yes |
| participants | array | The end-user participant on the voice call. Only one end user can be
specified. If there are multiple people in the array, the first person is assigned
as the end user. This property uses the following key-value pair, where participantKey is any unique identifier for the end user, and type is always "END_USER": |
Yes |
| callAttributes | string | Represents additional standard and custom fields in the voice call record,
where each key-value pair value corresponds to a standard or custom field and its
values. Possible standard fields are:
Here’s an example using the standard field
SourceType:
Here's
an example using a custom field named
"Department__c": |
No |
Example
Request: