Breadcrumbs

CX Events and Activity Types

This document explains the different events exposed by CIM along with the event type and payload. 

What is an Event? 

CIMEvent

A CIMEvent is defined as the smallest amount of valuable information representing change of state in the publishing application resource, where: 

  • A Resource is an object managed by an application. CIM is agnostic of resources. 

  • Valuable information - An information is valuable if it may be of interest for CIMEvent subscribers. 

  • An application is a 3rd application that uses CIM for storing and publishing events to other applications of interest. Any type and number of applications may register with CIM for publishing, subscribing, and reporting of events. 

A CIMEvent Subscriber may use CIMEvents for: 

Audit trail


Analytics

Agent performance, customer journey tracking, 

Monitoring

Service Levels, Customer Channels, Bot performance

Customer Interaction

Consolidate interesting events into Activities for agent serving customers

Agent Productivity

Capture agent actions for optimising workforce

Bot Retraining

Use CIM data to retrain bot via Supervised/semi-supervised learning


Show If macro has stopped working

Visibility for Confluence requires an active app subscription



Stateful

When it's important to monitor and keep track of the state of a session

Interactive

When a session cannot last if any of the participants leave the session. 


ChannelSessions are always stateful. They may or may not be interactive. For example, a call is an interactive session and the chat is a non-interactive session. 

Activities are always stateless. With this definition, an activity is the change of state in any system domain / conversation that the system considers as a considerable change of state.  

An Activity is a CIMEvent. 

Event Types

CIM Event

A change in state, an action performed by an actor that CIM needs to keep track of such as:

  • customer sent a message, made a call

  • agent sent a message, made a call

  • bot made a suggestion, sent a bot message

  • an app generated an activity such as VRS shared a recording link, campaign manager sent a message, pushed a campaign activity.

that CIM needs to keep track of. 

CTI Event




A call leg is an activity and the call is a session. 


3rd party voice call scenario

See the finalized flow of Voice call events and related use cases in Mapping CTI events on CIM.


Actors

Agent


Customer


Bot


App


Activity

An activity is formed based an actions performed by actors. An activity may be updated based on reactions, modify-activity events, and delivery notifications. Examples: 

  • a customer messageREACTION bot-suggestion is a reaction to the customer messageMODIFY-ACTIVITY edit/delete-message-event - the customer chose to change or delete the message DELIVERY-NOTIFICATION when the agent has read the message. The agent-manager will send this delivery-notification.

  • an agent messageDELIVERY-NOTIFICATION received message delivery notificationsREACTION customer's reactions to the message in the form of an emojiREACTION supervisor's reaction to flag the response as rude, inappropriate, misleading, excellent - based on defined custom flags

  • a bot messageDELIVERY-NOTIFICATION received message delivery notificationsREACTION customer's reactions to the message in the form of an emojiREACTION Bot trainer's reaction to flag a response as inappropriate - based on defined custom flags

  • a structured message sent by the bot or the agent - selected from bug suggestionsREACTION one ore more customer responses to the structured message 

  • a campaign message - the campaign manager sent an outbound campaign message DELIVERY-NOTIFICATION received message delivery notificationsREACTION customer's reactions to the message in the form of flags - acknowledged / inappropriate / annoying

  • an IVR activity - the IVR application sent an activity for an ongoing call.

  • an agent call leg - a call leg of a voice call handled by an agent

  • a call recording link received - the call recording application sent a call recording link for a recently completed call. The event must have a call id.

  • a note - A note sent by an actor - this may or may not have a reference to a channelSession or a conversation ID. 

  • wrap-up - a wrap-up activity performed by the agent on a conversation / session. The event must have the session or a conversation identifier.

  • a survey question - the campaign manager sent a survey question as a structured message REACTION customer's response to the survey question


During ongoing phone call, we want to continuously be able to forward speech files to an ASR/ NLU/ Conversation engine to provide services similar to Cisco Answer Services (aka Google Contact center AI). I would then assume that when the ASR engine detects silence/ end of a sentence, The marker information (start/ end time of a sentence) then becomes an activity that can then be run through the pipeline.


Identify Session-based or Session-less Activities

In this table, different activity persistence use cases are analyzed from the perspective of channelSession and conversation. The objective is to analyze the need to:

  • open or link a conversation

  • open on link a channelSession

Some use cases about scheduler are mentioned on Scheduled Activities.

Use case


ChannelSession

Conversation

RecordingSolution sent a voice call recording link

This is a session based activity where the completed call (call-id) is the session identifier.

required

Not-required

ASR sent a speech-to-text sentence 

  1. ASR channel connector sends this sentence of an ongoing customer call.

  2. ChannelManager identifies the relevant ChannelSession (call) and sends the message on the relevant customer-topic.

This is a session based activity where the ongoing voice call-id is a session identifier.

required

Not-required

Add conversation data

As a 3rd party app, if I add a new conversation data key-value pair, this should be stored as an activity as well.

Not-required

required

Update conversation data

As a 3rd party app, if I update an existing conversation data key-value pair, this should be stored an activity as well.

Not-required

required

Channel Session Events



CHANNEL_SESSION_STARTED

This event is fired when a new channel session is provisioned on the Channel Manager. 

Upon receiving this event, following components should take actions as described: 



ChannelManager

Notify this event to the ChannelConnector, if the connector's ChannelType is interactive.

Acceptance Criteria

  • Send a NotificationMessage of type CHANNEL_SESSION_STARTED to the ChannelConnector

BotFramework

Call the Bot with intent /CHANNEL_SESSION_STARTED 

AgentManager

Sends this as a SocketIO event onCimEvent to the Unified Agent. See

Socket Events






System Events


For the events Communicated over JMS:

  • JMS Message: CimEvent object (Json format of this object is presented below)

  • JMS Type: CIM-Event-Name (e.g. "CHANNEL_SESSION_STARTED")


JavaScript
{
	"id": "<UUID>",
	"name": "<String/Enum>",
	"type": "<String/Enum>",
	"timeStamp": "<TimeStamp>",
	"data": "<Any object/payload that needs to be sent with the event>" 
}


The following table presents the list of CIM events. Most of these events are communicated over JMS. Few events are communicated over REST APIs. 

  • For JMS events: the "payload" field is the same as the "data" field in the CimEvent object presented above.

  • For REST events: the "payload" field represents the REST API request-body.

Event Types

Type

Description

ACTIVITY

An event is considered of type activity if it carries primary action performed by the actors such as customer, agent, bot or a third-party app. For example, all customer, agent and bot messages are encapsulated in events of type ACTIVITY.

suggestion

Ideally it should be merged with message (@Unknown user to confirm). This type carries all events of type bot suggestions.

message

This event type carries internal communication . All internal and whisper communication among agents and bots.

notification

This event type carries all system notifications including REACTIONS or MODIFY EVENT or DELIVERY NOTIFICATION


Conversation Events

Event name

Who Fires and When

Event Payload

Conversation-Manager

Channel-Manager

Bot-Framework

Agent-Manager

Default Controller Behaviour

CUSTOMER_MESSAGE

Conversation_Event   ACTIVITY


ChannelManager fires it on receiving a message from its Channel Connector.


CIMMessage


Publisher

Consumer.

Cache this event in Redis.

<also explain bot behaviour or agent will behave>

Consumer

Send this event to the unified agent over the socket.

  • Stop Customer Inactivity timer of the current channel Session.

  • Start Customer Inactivity timer for all other active channel session, if their timer is not already running.

AGENT_MESSAGE

JMS   ACTIVITY

AgentManager fires it on receiving a message from the agent.

CIMMessage


Consumer

Consumer

Publisher

  • Start Customer Inactivity timer for the current channel session if it is not running already

BOT_MESSAGE

JMS   ACTIVITY

BotFramework fires

CIMMessage


Consumer

Publisher

Consumer

  • Start Customer Inactivity timer for the current channel session if it is not running already

BOT_SUGGESTION

JMS   suggestion

BotFramework fires

SuggestionMessage


NA

Publisher

Consumer

Ignore

WHISPER_MESSAGE

JMS   message

AgentManager fires

CimMessage Object

NA

NA

NA

Publisher

Does Nothing

CHANNEL_SESSION_STARTED

JMS   notification

Channel Manager fires


ChannelSession Object


Publisher

Consumer

NA

  • Start Customer Inactivity Timer for all active channel sessions

  • Send a welcome message except in the following casesAgent OutboundCisco Voice

CHANNEL_SESSION_ENDED

JMS   notification

Channel Manager fires - confirm which other interfaces fire this event

  • purpose of the event and trigger (time wise, based on the type of message sent)


ChannelSession Object



Consumer


  • Remove this channel session's state from controller

  • If this is the last channel session. (Customer Left)If an agent was requested, Fire cancel-resource actionIf no agents in conversation, fire end-conversation action

CHANNEL_SESSION_EXPIRED

JMS   notification

Channel Manager fires - confirm which other interfaces fire this event

ChannelSession



Publisher


      • Does nothing

AGENT_RESERVED

rest   notification



JavaScript
{
	"topicId": "<String>",
	"ccUser": "<CcUser>"
}



NA

Consumer

NA

  • Send an 'Agent is reserved.....' message

EWT_MESSAGE  future

JMS   activity







-

AGENT_SUBSCRIBED

JMS   notification



JavaScript
{
	"agentParticipant": {},
	"reason": ""
}




Consumer

Publisher

  • If customer has left, fire revoke-request action and return

  • If bot is in the conversation and it's role is Primary, change it to Assistant

AGENT_UNSUBSCRIBED

JMS   notification



JavaScript
{
	"agentParticipant": {},
	"reason": ""
}




Consumer

Publisher

  • If this is the last agent:If a conference request was in-progress, cancel that requestIf customer is not in the conversation, fire end-conversation event else if customer is still in the conversation:If a transfer request is made do nothing. else if agent is forced-logout by the system (socket-timeout), find another agent on this conversation.

AGENT_RESPONSE_TIMEOUT

JMS   notification

When the agent response SLA is expired






-

BOT_TIMEOUT

JMS   notification

BotFramework fires this if and when the bot doesn't respond timely in response to a customer message.

String



Publisher


-

BOT_NOT_AVAILABLE

JMS   notification

not implemented yet






-

CUSTOMER_RESPONSE_TIMEOUT

JMS   notification







-

TOPIC_STATE_CHANGED

JMS   notification


CustomerTopic



Publisher


-

ASSOCIATED_CUSTOMER_CHANGED

JMS   notification







-

MESSAGE_DELIVERY_NOTIFICATION

JMS   notification







-

WRAPUP_APPLIED ?

JMS   activity







-

ACCEPT_TIMEOUT

JMS   notification







-

TASK_STATE_CHANGED

JMS   notification


TaskDto





Does Nothing

REVOKE_RESOURCE

JMS   notification



JavaScript
{
	"reasonCode": "<String>" 
}



NA

Publisher

Consumer

Does Nothing

CONVERSATION_DATA_CHANGED

JMS   notification


Map<String, String> ... (any Key-value pairs)



Publisher


Does Nothing

PARTICIPANT_ROLE_CHANGED

JMS   notification



JavaScript
{
    "conversationParticipant {},
    "metadata": {} // (any)
}


Publisher

Consumer


Consumer

Does Nothing

NO_AGENT_AVAILABLE

rest   notification





NA

Consumer

NA

  • Start Customer Inactivity timer for the current channel session if it is not running already

{ "topicId": "<String>" }








ACTION_MESSAGE

JMS   message


CimMessage Object

Consumer

NA

Publisher

NA

  • For FIND_AGENT action, if an agent is not already requested, the controller requests RE to find an agent

  • For all other Actions, the controller just fires the same action back to conversation manager

CALL_LEG_ENDED

JMS   ACTIVITY


CIMMessage


NA

Consumer

NA

-

AGENT_OUTBOUND

JMS ACTIVITY







  • Get the Agent from the DTO

  • If Agent is not already in the conversationFire Assign-Agent Action

  • Ignore this event if associated channel session is not found

TASK_ENQUEUED

JMS ACTIVITY







  • If Task direction is DIRECT_TRANSFER or DIRECT_CONFERENCEUpdate controller's agent state to agent-requested

MESSAGE_DELIVERY_NOTIFICATION

JMS   notification

Agent_manager fires it when the agent has read the customer message

CIMMessage


Consumer


Publisher


THIRD_PARTY_ACTIVITY

JMS notification


CIMMessage

Producer

Consumer


Consumer


CHANNEL_SESSION_DATA_UPDATED

JMS notification

CCM fire it when the channelSession data is update

ChannelSession Object


Publisher



Does Nothing



Related Docs Page: (4.8) CX-Activities Page: (4.7) CX-Activities Page: (4.4) CX Events and Activity Types Page: (4.6) CX-Activities Page: (4.3) CX Events and Activity Types Page: (4.5.3) CX-Activities Page: (4.5.2) CX-Activities Page: (4.5.1) CX-Activities Page: Messages, Events, and Activities Page: (4.5) CX-Activities Page: (4.9) CX-Activities