Newer Version Available
Create a Transcript
Use this API to create transcripts for one voice call in real time. Voice calls can include inbound calls, transfer calls, outbound calls, and callback calls. The transcript data is sent to the agent console synchronously in real time and will be persisted in Salesforce asynchronously.
- Both APIs create voice call transcripts if the timestamp of the transcript is between the start and end times of the conversation.
- Both APIs pause call transcription whenever the agent pauses the recording or places the call participant on hold. Any messages being sent in won’t be created or stored by the API during this time.
To create or update transcripts in bulk after the call has ended, use the Salesforce Connect API.
URI
/telephony/v1/voiceCalls/{vendorCallKey}/messages
Where vendorCallKey is the unique ID of the voice call (VoiceCall) record within the telephony system. For example, if the telephony system is Amazon Connect, this value is the contact ID in Amazon Connect. In transfer use cases where there are multiple VoiceCall objects associated to a single call, use the vendorCallKey of the first voice call record created for the call. This value can only be the unique call identifier of the first contact for the conversation. This value can't be a Salesforce voiceCallId.
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 |
|---|---|---|---|
| participantId | string | The call participant role that uttered this text.
|
Yes |
| messageId | string | The unique ID of the message. This value has to be unique for the given conversation. | Yes |
| startTime | int64 | The date and time (in UTC) when this utterance started. Measured in milliseconds since the Unix epoch. | Yes |
| endTime | int64 | The date and time (in UTC) when this utterance ended. Measured in milliseconds since the Unix epoch. | Yes |
| content | string | The actual text of the utterance. | Yes |
| senderType | string | the voice call participant role that generated the utterance. Possible values are:
|
Yes |
Example
Request:
1POST telephony/v1/voiceCalls/5324881f-1e84-4367-8930-f69a74b30ca6/messages
2
3{
4 "participantId": "5324881f-1e84-4367-8930-f69a74b30ca6VIRTUAL_AGENT",
5 "messageId": "57904eb6-5352-4c5e-adf6-5f100572cf5d116",
6 "startTime": 1573503300000,
7 "endTime": 1573503300000,
8 "content": "Hello All",
9 "senderType": "VIRTUAL_AGENT"
10}Response:
1{
2 "result": "Accepted"
3}