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, callback calls, and consult calls. The transcript data is sent to the rep 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 rep 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.
In consult call use cases where a consult call hasn't merged with a multiparty call, use the vendorCallKey of the voice call record created for the consult call. To transcribe a consult call after it has merged with a multiparty call, use the vendorCallKey of the first voice call record created for the multiparty call.
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 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}Request:
1POST telephony/v1/voiceCalls/5324881f-1e84-4367-8930-f69a74b30ca6/messages
2
3{
4 "participantId": "005123456789abc",
5 "messageId": "57904eb6-5352-4c5e-adf6-5f100572cf5d116",
6 "startTime": 1573503300000,
7 "endTime": 1573503300000,
8 "content": "Hello All",
9 "senderType": "HUMAN_AGENT"
10}Request:
1POST telephony/v1/voiceCalls/5324881f-1e84-4367-8930-f69a74b30ca6/messages
2
3{
4 "participantId": "a12355ce-03be-4335-a28891293sz",
5 "messageId": "57904eb6-5352-4c5e-adf6-5f100572cf5d116",
6 "startTime": 1573503300000,
7 "endTime": 1573503300000,
8 "content": "Hello All",
9 "senderType": "EXTERNAL_USER"
10}Response:
1{
2 "result": "Accepted"
3}