Notification Event JSON Objects

Notification events are returned to subscribers in the form of JSON objects, which conform to the following structure:

FieldTypeDescription
idstringUnique id of the notification event
timenumberTime at which the event was emitted, in ms past epoch (01/01/70 00:00:00 UTC)
verstringThe event format version (currently “1.0”)
typestringThe event type (see below for possible values)
payloadobjectThe event type-specific payload

Notification Event Types

The following are valid values of the type field:

Behavioral Notifications

Event TypeDescription
slowToRespondAgentOpenedSlow to Respond notification opened
slowToRespondAgentClosedSlow to Respond notification closed
silenceHighOpenedExtended Silence notification opened
silenceHighClosedExtended Silence notification closed
speakingRateLowAgentOpenedSpeaking Slowly notification opened
speakingRateLowAgentClosedSpeaking Slowly notification closed
empathyCueOpenedEmpathy Cue notification opened
empathyCueClosedEmpathy Cue notification closed
lowEnergyAgentOpenedEnergy Cue notification opened
lowEnergyAgentClosedEnergy Cue notification closed
continuousSpeakingAgentOpenedContinuous Speaking notification opened
continuousSpeakingAgentClosedContinuous Speaking notification closed
extendedOverlapOpenedExtended Overlap notification opened
extendedOverlapClosedExtended Overlap notification closed
speakingRateHighAgentOpenedSpeaking Quickly notification opened
speakingRateHighAgentClosedSpeaking Quickly notification closed
positiveInteractionOpenedPositive Interaction notification opened
positiveInteractionClosedPositive Interaction notification closed

Call Score Notifications

Event TypeDescription
cxScoreUpdatedExperience Score updated

Notification Event Payloads

The structure of the payload field of the notification event JSON object varies depending on the type of the event.

Behavioral Notification Opened Event Payload

FieldTypeDescription
callIdstringThe ID of the call during which this notification occurred
usernamestringThe Cogito username of the user associated with the call
bTimenumberThe time in ms, relative to the start of the call, at which the behavior leading to the notification began
nTimenumberThe time in ms, relative to the start of the call, at which the notification is to be presented to the user
idxnumberThe sequence number of this event within the call. This number is unique within the same event type and call

Behavioral Notification Closed Event Payload

FieldTypeDescription
callIdstringThe ID of the call during which this notification occurred
usernamestringThe Cogito username of the user associated with the call
bTimenumberThe time in ms, relative to the start of the call, at which the behavior leading to the notification ended
nTimenumberThe time in ms, relative to the start of the call, at which the notification is to no longer be presented to the user
bDurnumberThe duration in ms of the behavior that led to the notification
nDurnumberThe duration in ms, during which the notification is to be presented to the user
idxnumberThe sequence number of this event within the call. This number is unique within the same event type and call

Call Score Updated Event Payload

FieldTypeDescription
callIdstringThe ID of the call during which this notification occurred
usernamestringThe Cogito username of the user associated with the call
scorenumberThe call score

Example Notification Event JSON Objects

Behavioral Notification Opened Event

{"id":"adbce960-4d47-4d42-8fd5-52f70d867412", "time":1603158961452,"ver":"1.0",
"type":"lowEnergyAgentOpened","payload":{"callId":"TestCall-12a86f31-a569-4873-a121-b5137aca721d","username":"testAgent","bTime":21648,"nTime":35912,"idx":0}}

Behavioral Notification Closed Event

{"id":"0774112b-0f21-4d67-9664-0ae14b6921de","time":1603158972424,"ver":"1.0",
"type":"lowEnergyAgentClosed","payload":{"callId":"TestCall-12a86f31-a569-4873-a121-b5137aca721d","username":"testAgent","bTime":35912,"nTime":46800,"bDur":14264,"nDur":10888,"idx":0}}

Call Score Updated Event

{"id":"3bbeae95-fc01-4bd8-a912-6231967ba073","time":1603246877552,"ver":"1.0","type":"cxScoreUpdated","payload":{"callId":"TestCall-1a1b5fce-6267-4e61-a002-0bc692fe7ded","username":"testAgent","score":7.41417}}