Newer Version Available

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

Store a Post-Call Conversation Event

Store post-call conversation events generated from intelligence sources, such as Amazon Connect Contact Lens, into the conversation data store. Users can also specify the target objects (for example, VoiceCall, ConversationEntry) related to the specific event.

Salesforce uses these stored events and relationships to display call insights after a call ends. The data can also be linked to other Salesforce standard objects, such as VoiceCall and ConversationEntry.

This API should only be invoked after a conversation closes.

URI

/telephony/v1/voiceCalls/{vendorCallKey}/postConversationEvents

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 post-call from a voice call between a rep and end user. This data is used for post-call event analysis.  Events must be sorted in chronological ascending order by startTime.

For example, the following snippet displays event data used for post-call analysis:

1{
2  "type": "IntelligenceSignal__Sentiment",
3  "value": "-1000",
4  "startTime": 1573503301,
5  "endTime": 1573503320,
6  "participant": "CUSTOMER"
7}
Yes
events.type string The signal type of the event. Possible values are:
  • IntelligenceSignal__Sentiment
Yes
events.value string The value of the signal detected. For type IntelligenceSignal__Sentiment, the value represents the sentiment of the words spoken by the participants in the call, ranging between -1000 (most negative) and 1000 (most positive). A value of zero (0) represents a neutral sentiment. Yes
events.startTime int64 The date and time (in UTC) when this event started. Measured in milliseconds since the Unix epoch. Yes
events.endTime int64 The date and time (in UTC) when this event ended. Measured in milliseconds since the Unix epoch. Yes
events.participant string The voice call participant type that generated the signal. Possible values are:
  • AGENT - Represents a rep.
  • CUSTOMER - Represents a customer.
Yes

Example

Request:

1POST /telephony/v1/voiceCalls/5324881f-1e84-4367-8930-f69a74b30ca6/postConversationEvents
2
3{
4  "service": "AmazonConnectContactLens",
5  "events": [ // sort by startTime
6    {
7      "type": "IntelligenceSignal__Sentiment",
8      "value": "1000",
9      "startTime": 1573503300,
10      "endTime": 1573532140,
11      "participant": "AGENT"
12     },
13     {
14      "type": "IntelligenceSignal__Sentiment",
15      "value": "-1000",
16      "startTime": 1573503301,
17      "endTime": 1573503320,
18      "participant": "CUSTOMER"
19    }
20  ]
21}
Response:
1{
2  status: “202 Accepted” 
3}