Skip to main content
Skip table of contents

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


AccessDeniedAccess DeniedG4CJSM70P1E2TN4Hov1e/H4068w8UrjgItvuDNeGMLgBkQp7U0ZMTJFwgfZ1D/TLVmJkv+J8YmT/8ftnB850sFSKGY4=



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 message
    • REACTION bot-suggestion is a reaction to the customer message
    • MODIFY-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 message
    • DELIVERY-NOTIFICATION received message delivery notifications
    • REACTION customer's reactions to the message in the form of an emoji
    • REACTION supervisor's reaction to flag the response as rude, inappropriate, misleading, excellent - based on defined custom flags
  • a bot message
    • DELIVERY-NOTIFICATION received message delivery notifications
    • REACTION customer's reactions to the message in the form of an emoji
    • REACTION 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 suggestions
    • REACTION 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 notifications
    • REACTION 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
ChannelSessionConversation
RecordingSolution sent a voice call recording linkThis 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 dataAs 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 dataAs 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 

AgentManagerSends 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")


CimEvent object

JS
{
	"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

TypeDescription

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 (@a 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 nameWho Fires and WhenEvent PayloadConversation-ManagerChannel-ManagerBot-FrameworkAgent-ManagerDefault Controller Behaviour

CUSTOMER_MESSAGE

CONVERSATION_EVENT ACTIVITY


ChannelManager fires it on receiving a message from its Channel Connector.
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
ConsumerConsumerPublisher
  • Start Customer Inactivity timer for the current channel session if it is not running already

BOT_MESSAGE

JMS ACTIVITY

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

BOT_SUGGESTION

JMS SUGGESTION

BotFramework firesSuggestionMessage
NAPublisherConsumerIgnore

WHISPER_MESSAGE

JMS MESSAGE

AgentManager firesCimMessage ObjectNANANAPublisherDoes Nothing

CHANNEL_SESSION_STARTED

JMS NOTIFICATION

Channel Manager fires
PublisherConsumerNA
  • Start Customer Inactivity Timer for all active channel sessions
  • Send a welcome message except in the following cases
    • Agent Outbound
    • Cisco 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)


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 action
    • If no agents in conversation, fire end-conversation action

CHANNEL_SESSION_EXPIRED

JMS NOTIFICATION

Channel Manager fires - confirm which other interfaces fire this eventChannelSession

Publisher
      • Does nothing

AGENT_RESERVED

REST NOTIFICATION


Event payload

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

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

EWT_MESSAGE FUTURE

JMS ACTIVITY







-

AGENT_SUBSCRIBED

JMS NOTIFICATION


Event payload

JS
{
	"agentParticipant": {},
	"reason": ""
}


ConsumerPublisher
  • 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


Event payload

JS
{
	"agentParticipant": {},
	"reason": ""
}


ConsumerPublisher
  • If this is the last agent:
    • If a conference request was in-progress, cancel that request
    • If 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


Event payload

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

NAPublisherConsumerDoes Nothing

CONVERSATION_DATA_CHANGED

JMS NOTIFICATION


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

Publisher
Does Nothing

PARTICIPANT_ROLE_CHANGED

JMS NOTIFICATION


Event Payload

JS
{
    "conversationParticipant {},
    "metadata": {} // (any)
}
PublisherConsumer
ConsumerDoes Nothing

NO_AGENT_AVAILABLE

REST NOTIFICATION



NAConsumerNA
  • Start Customer Inactivity timer for the current channel session if it is not running already
{
	"topicId": "<String>" 
}







ACTION_MESSAGE

JMS MESSAGE


CimMessage Object

Consumer

NAPublisherNA
  • 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
NAConsumerNA-

AGENT_OUTBOUND

JMS ACTIVITY







  • Get the Agent from the DTO
  • If Agent is not already in the conversation
    • Fire 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_CONFERENCE
    • Update controller's agent state to agent-requested
MESSAGE_DELIVERY_NOTIFICATION

JMS NOTIFICATION

Agent_manager fires it when the agent has read the customer messageCIMMessage
Consumer
Publisher

THIRD_PARTY_ACTIVITY

JMS NOTIFICATION


CIMMessageProducerConsumer
Consumer

CHANNEL_SESSION_DATA_UPDATED

JMS NOTIFICATION

CCM fire it when the channelSession data is updateChannelSession Object
Publisher

Does Nothing

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.