Newer Version Available

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

Service Cloud Voice Aura Toolkit API Conversation Events

Listen to events related to a conversation.

The following conversation events are available.

Event Name Description
FLAG_RAISE Sent when an agent, while communicating with a customer, quietly raises a flag to get help from a supervisor.
FLAG_LOWER Sent when an agent or supervisor lowers a raised flag to cancel the request for supervisor help.
NOTE Sent when an agent or supervisor sends a message without raising a flag. For example, an event is sent when a user jots down notes but doesn't raise a flag.
TRANSCRIPT Sent when a new utterance is received by the transcription system.

To subscribe to an event, add a conversation event listener. For example, add the following event listener to subscribe to the TRANSCRIPT event:

You can add multiple conversation event listeners. For example, you can add the following event listeners to subscribe to all the events related to raising and lowering flags:

When an event occurs, you receive a JSON payload that contains the event type, along with any relevant data. For instance:

The following table describes all the payload properties.

Property Name Type Description
type string The type of conversation event.
detail object Identifying information associated with this voice call event.
detail.id string Unique identifier for the message.
detail.clientSentTimestamp number The date and time (in UTC) when the client sent the content. Measured in milliseconds since the Unix epoch.
detail.serverReceivedTimestamp number The date and time (in UTC) when the server received the content. Measured in milliseconds since the Unix epoch.
content object Information about the content.
content.formatType string The content format type of the raised flag, note, or transcript. Possible value is “Text.”
content.text string The body text of the raised flag, note, or transcript.
callId string The unique ID of the voice call within the telephony system. For example, if the telephony system is Amazon Connect, this value is the contact ID.
sender object Information about the user whose action initiated the event.
sender.role string The role of the user whose action initiated the event. Possible values are "Agent" and "Supervisor".
sender.displayName string The name of the user whose action initiated the event.