Skip to main content
Skip table of contents

Hybrid Chat Reporting Database Schema

Entity Relationship Diagram

This is the SQL server reporting database schema of Hybrid Chat. 


Agents

FieldData TypeConstraints

Description

agent_idNVARCHAR(50)

PK, NOT NULL

In the case of standalone deployment, this is the same as the UMM Username.

In the case of CCX integration, this is CCX resource_login_id

In the case of Cisco CCE integration, it's PeripheralNumber.

nameNVARCHAR(110)NOT NULL

In the case of standalone deployment, This is UMM fullName

In the case of Cisco Finesse integration, this is concatenated resource_first_name + space + last_name.

createdAtDATETIMENOT NULLThe time when this record was created/inserted into the database.
updatedAtDATETIMENOT NULLThe time when the agent record was last updated in the database.
is_deletedBITNOT NULL

If the agent is deleted, the value should be 1. 

If the agent is active, the value should be 0. 

Agent_MRD_State_Events

This table contains agent state change within that MRD. Upon each state change event, a record is inserted in this table. 

FieldData TypeConstraintsDescription
idINTPK
NOT NULL
Autoincrement
agent_idNVARCHAR(50)FK
NOT NULL

Foreign key from the Agent table

mrd_idINTFK
NOT NULL
Foreign key from the MRD table
stateVARCHAR(50)NOT NULL

Hybrid Chat MRD states. 

[LOGGED_IN | READY | ACTIVE | NOT_READY | BUSY | INTERRUPTED | UNKNOWN | LOGOUT]

modeBITNOT NULL

If agent mode is routable, the value should be 1.
If agent mode is not routable, the value should be 0.
It is used for Pending NOT READY state handling. Routable mode specifies that an agent can accept new chats either he/she is in READY / ACTIVE states. If an agent's mode is not routable, he/she cannot accept new chat requests and after current chats (if any) end, the agent state will be changed to NOT READY.

reason_codeINTFK, NULLForeign key from the Reason Code table - Reserved for future use.
event_timeDATETIMENOT NULLThe time when the state change event occurred.
createdAtDATETIMENOT NULLThe time when the record is inserted in this table.
login_timeDATETIMENOT NULLThe time when the agent logged in. For all agent state change events, this value remains the same for a single logged-in session.

Queues

FieldData TypeConstraintsDescription
queue_idINTPK, NOT NULLThe auto-generated auto-increment Queue identifier. 
queue_nameNVARCHAR(50)NOT NULL

The queue name as mentioned in MRE UI. This name cannot be changed in MRE once created.

service_level_thresholdSMALL INTNOT NULLOption to add the SL threshold of the queue at the time of the creation. This is the time in seconds. It contains only positive values from 0-MAX_INT.
service_level_typeSMALL_INTNOT NULL

The value will be (1,2, or 3)

1- Ignore abandoned chats (Subtracted from the Offered Chats during Service Level Calculation).

2- Abandoned chats have a negative impact (Not included at all in the Service Level Calculation).

3- Abandoned chats have a positive impact ( Added with the Service Level answered chats). 

createdAtDATETIMENOT NULLThe time when the queue was created in MRE/MRE_UI. 
updatedAtDATETIMENOT NULLThe time when the queue is updated in MRE/MRE_UI. 
is_deletedBITNOT NULL

If the queue is deleted, the value should be 1. 

If the queue is active, the value should be 0.

Queue Chat Details

Each record in this table represents a chat handling session by a contact center resource (agent or bot).

FieldData TypeConstraintsDescription
idINTPK
NOT NULL

auto increment

session_id 

TASK-ID

VARCHAR (50)NULL

This ID is assigned to every chat request for queuing to the agent by the Routing Engine. If the chat request is re-routed, the same session_id is preserved. There can be multiple sessions for the same conversation. 

In the customer-to-bot conversation leg, the value is NULL. This is not a chat session-id. If you want to see individual sessions in a conversation, use customer_id.

conversation_idCHAT-SESSION-ID

VARCHAR (100)NOT NULLIt's the Conversation ID from the Chat Server. It's unique ID for individual chat session. 

customer_id


VARCHAR (100)NOT NULLA random id assigned to the customer by the Chat Server as a chat participant. It has nothing to do with customer identification.
customer_nameNVARCHAR (100)NOT NULL

The name of the customer as received from the customer channel. For: 

  • Web Chat, it's the concatenation (FName, LName)
  • WhatsApp, it's the WhatsApp id sent by Twilio i.e +<phone-number> 
  • Facebook, it's the concatenation of customer account first name & last name
  • Viber, it's the concatenation of customer account first name & last name
  • SMS, it's the customer phone number
customer_ndVARCHAR (100)NOT NULL

Customer unique identifier

  1. Viber UserID in case of Viber - stored after Base64 encoding
  2. Facebook UserID in case of Facebook - stored after Base64 encoding
  3. Phone Number in case of WhatsApp, SMS, Web Chat - stored as received
queue_idintFK, NULLForeign key from the Queue table
agent_idNVARCHAR(50)FK, NULL

Foreign key from the Agent table. The value will be NULL for the customer-2-bot leg.

bot_idNVARCHAR(50)FK, NULL

The ID of the bot that handled this chat leg.

Foreign key from the Bots table

typeVARCHAR (50)NOT NULL

INBOUND | TRANSFER | CONFERENCE

  • INBOUND, when a customer's chat request is received
  • TRANSFER, when a chat is transferred to another agent
  • CONFERENCE, when the chat is conferenced.
enqueue_timeDATETIMENULLThe time when the chat was enqueued. If NULL, the chat was handled by the chatbot and wasn't enqueued for routing.
start_timeDATETIMENULLThe time when the task state transitions to ACTIVE. This happens when the agent accepts the chat or when the chat is automatically started with the agent due to AUTO_ACCEPT.
If NULL means that the agent did not accept the chat request.
end_timeDATETIMENULL
  • For Transferred chat, it's the time of transfer.
  • For RONA, it's the event time when the chat is re-queued on no response from an agent
  • When an agent leaves the conference, end_time is updated. 
  • For all other cases, it's the time when the task sate changed to CLOSED. That's when the chat is ended either by the customer, agent, or network. 
  • If NULL, the chat is not ended yet.
ended_byVARCHAR(50)NULL

Specifies which participant ended the chat, or it was ended due to a network outage.
Possible values are CUSTOMER | AGENT | NETWORK | RONA | BOT

  • RONA - In case ended_by RONA, the agent_id contains ID of the agent and start_time is null.
chat_linkNVARCHAR(250)NULLThis is the chat history URL for the conversation, so all messages exchanged on that conversation will be available on this link.
createdAtDATETIMENOT NULLIt's the time when the record was inserted into the database
updatedAtDATETIMENULLIt's the time when the record was updated into the database
channel_codeINTFK  NULLForeign key from the Channel table
channel_data_1NVARCHAR(250)NULLChannel data parameter 1
channel_data_2NVARCHAR(250)NULLChannel data parameter 2
channel_data_3NVARCHAR(250)NULLChannel data parameter 3
channel_data_4NVARCHAR(250)NULLChannel data parameter 4
channel_data_5NVARCHAR(250)NULLChannel data parameter 5
session_start_timeDATETIMENULLThe time when this chat session was started. This is application event time.

Channels

FieldData TypeConstraintsDescription
channel_codeINTPK, NOT NULL
NameVARCHAR(50)NOT NULLMultiple channel instances of the same channel may be specified as WhatsApp099, WhatsApp9800
createdAtDATETIMENOT NULLThe time when the record is created. 
updatedAtDATETIMENOT NULLThe time when the record is updated.
is_deletedBITNOT NULL

If the queue is deleted, the value should be 1. 

If the queue is active, the value should be 0. 

MRDs

FieldData TypeConstraintsDescription
mrd_idINTPK NOT NULL
NameVARCHAR(50)NULL
createdAtDATETIMENOT NULLThe time when the record is inserted into this table
updatedAtDATETIMENOT NULLThe time when the record is updated in this table
is_deletedBITNOT NULL

If the queue is deleted, the value should be 1. 

If the queue is active, the value should be 0. 

Bots

FieldData TypeConstraintsDescription
bot_idNVARCHAR(50)NOT NULLIdentifier of the bot that participated in this conversation
bot_nameNVARCHAR(50)NOT NULLName of the bot as given in the bot-connector configurations
createdAtDATETIMENOT NULLThe time when the record is inserted into this table
updatedAtDATETIMENOT NULLThe time when the record is updated in this table
is_deletedBITNOT NULL

If the bot is deleted, the value should be 1. 

If the bot is active, the value should be 0. 

Reason Codes 

This table is intended for future use

FieldData TypeConstraintsDescription
reason_codeINTPK
NOT NULL

stateVARCHAR(50)NOT NULL

Hybrid Chat MRD states. 

[NOT_READY | UNKNOWN | LOGOUT]

DescriptionVARCHAR(100)NULL
createdAtDATETIMENOT NULLThe time when the record is inserted into this table
updatedAtDATETIMENOT NULLThe time when the record is updated in this table
is_deletedBITNOT NULL

If the queue is deleted, the value should be 1. 

If the queue is active, the value should be 0. 

Chat Session

Session-wise detailed data.

For Future Use

  • Chat Volume by channel (day/hour wise)
    • channel
    • day
    • session-count-by-channel
    • average-session-duration

FieldData TypeConstraintsDescription
idINTPKAutoincrement
session_idVARCHAR(100)NOT NULLChat session id
session_typeVARCHAR(50)NOT NULLChat session type e.g. BOT | AGENT | HYBRID
conversation_idVARCHAR(100)NOT NULLConversation Id
customer_ndNVARCHAR(100)NOT NULLCustomer identifier
start_timeDATETIMENOT NULLChat session start time
end_timeDATETIMENOT NULLChat session end time
transcript_urlNVARCHAR(250)NOT NULLChat transcript URL, not to be confused by chat history URL.
channel_codeINTNOT NULLChannel for which this chat session was initiated



JavaScript errors detected

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

If this problem persists, please contact our support.