Newer Version Available

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

Send a Real-Time Conversation Event

Send real-time conversation events generated from intelligence sources, such as Amazon Connect Contact Lens, to the agent console.

Send real-time conversation events generated from intelligence sources, such as Amazon Connect Contact Lens, to the agent console so administrators can create rules based on the signals to trigger Einsten Next Best Action or auto-launched flows. The signals are also sent to the Service Cloud Voice Toolkit API.

URI

/telephony/v1/voiceCalls/{vendorCallKey}/realtimeConversationEvents

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
service string The intelligence source of the events. Possible values are:
  • AmazonConnectContactLens
Yes
events array A piece of signal data generated in real time from a voice call between an agent and end user. Events must be sorted in chronological ascending order by startTime. For example, the following snippet displays a piece of signal data.
1{
2  "type": "IntelligenceSignal__Category",
3  "value": "CustomerAngry",
4  "startTime": 1573503450
5}
Yes
events.type string The signal type of the event. Possible values are:
  • IntelligenceSignal__Category
Yes
events.value string The value of the signal generated in real time by the telephony vendor. For example, this could be a Contact Lens rule defined in Amazon Connect. Yes
events.startTime int64 The date and time (in UTC) when this event started. Measured in milliseconds since the Unix epoch. Yes

Example

Request:

1POST /telephony/v1/voiceCalls/5324881f-1e84-4367-8930-f69a74b30ca6/realtimeConversationEvents
2
3{
4  "service": "AmazonConnectContactLens",
5  "events": [
6    {
7      "type": "IntelligenceSignal__Category",
8      "value": "OrderStatusCheckingHelp",
9      "startTime": 1573503300
10    },
11    {
12      "type": "IntelligenceSignal__Category",
13      "value": "CustomerAngry",
14      "startTime": 1573503450
15    }
16  ]
17}
Response:
1{
2  status: “202 Accepted” 
3}