Transformation Rules - ETL Pipelines
This document outlines the transformation rules and source-to-target data mappings for ETL pipelines.
Explanation of Columns
Target Field
Represents the field name in the target system where the transformed data will be stored.
Source Field (MongoDB)
Specifies the corresponding field in MongoDB from which the data is extracted.
Source Data Type
Defines the data type of the source field in MongoDB (e.g.,
String
,Integer
,DateTime
).
Field Type
Indicates whether the field is an Existing Field or a Custom Field.
Existing Field: An existing field is a field whose data is directly available in the source (MongoDB) and is only flattened by our ETL.
Custom Field: A custom field is a field that has some custom logic calculated by our ETL and is added for specific business needs.
Transformation Rules
Describes the logic applied to convert the source data into the target format.
For Further Transformation Details or Database Schema refer to this document: Reporting Database Schema
Table of Contents:
Configuration ETL Pipelines:
Transactional ETL Pipelines:
ETL Pipelines - Transformation Rules
Configurational ETL Pipelines:
Agent
This manages the records of an agent in the system. The job handles the insertion and updating of agent details, ensuring that each agent's details are correctly maintained in the database. Additionally, it updates the is_deleted
column to TRUE
if an agent is deleted from the source.
Extraction Details
Purpose: Extracts data from MongoDB collection.
Source: MongoDB source to extract data is as follows:
routing-engine-db.agents
MongoDB Query:
{}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
agent_id |
| String | Existing | Unique id to identify this agent. |
agent_name |
| String | Existing | Records the name of the agent. |
username |
| String | Existing | Records the username of the agent. |
agent_extension |
| Array of Strings | Existing |
|
team_id |
| String | Existing | Identifies the team/teams the agent is part of. |
created_at |
|
| Custom | Records the date and time of when the agent was created. |
updated_at |
|
| Custom | Records the date and time of when the agent was last updated. |
is_deleted |
|
| Custom | Checks if the agent is deleted from the backend or not (soft deletion). If the agent is deleted this sets to ‘TRUE’ else it is ‘FALSE’. |
Bot
Bot manages the records of bot/bots configured in the system. This handles the insertion and updating of bot details, ensuring that each bot's details are correctly maintained in the database. One bot's details are added as a single record in the target table.
Extraction Details
Purpose: Extracts data from MongoDB collection.
Source: MongoDB source to extract data is as follows:
bot-framework_db.botConnectors
MongoDB Query:
{}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
bot_id |
| Object Id | Existing | Unique id for the respective bot |
bot_name |
| String | Existing | Records the name of the bot. |
created_at |
|
| Custom | Records the date and time when the bot is created. |
updated_at |
|
| Custom | Records the date and time when the bot is updated. |
is_deleted |
|
| Custom | Indicates the bot has been deleted from the system.(Used for soft deletion) |
Channel Type
A channel type describes the type/class of the channels, for example, WHATSAPP, SMS, WEB. Multiple channels of a channel type can be created.
Extraction Details
Purpose: Extracts data from MongoDB collection.
Source: MongoDB source to extract data is as follows:
ccm_db.ChannelType
MongoDB Query:
{}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
channel_type_id |
| Object Id | Existing | Unique id to identify this channel type. |
channel_type_name |
| String | Existing | Records the name for this channel type, any alphanumeric value. |
Channel
A channel instance is created when a new communication channel is registered by the system. It includes all the configuration details of a channel, such as the channel name, service identifier, channel mode, etc. A channel is of a particular channel type. For instance, we can create two channels WhatsApp-external and WhatsApp-internal, both of a channel type WHATSAPP.
Extraction Details
Purpose: Extracts data from MongoDB collection.
Source: MongoDB source to extract data is as follows:
ccm_db.Channel
MongoDB Query:
{}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
channel_id |
| Object Id | Existing | Unique id to identify the channel. |
channel_name |
| String | Existing | Records the name of the channel. |
channel_type_id |
| Array | Existing | Identifies the channel type for the channel. |
channel_mode |
| String | Existing | Indicates the channel mode configured for this channel. This can be:
|
service_identifier |
| String | Existing | Unique identifier like a phone number or URL associated to this channel. |
created_at |
|
| Custom | Records the date and time when this record is created. |
updated_at |
|
| Custom | Records the date and time when this record is updated. |
is_deleted |
|
| Custom | Indicates that this channel has been deleted from the system. (Used for soft deletion) |
Queue
Queue manages the properties of a routing queue. Whenever a human agent is required for a conversation, a request to assign an agent is created by the system and offered to a routing queue. The properties of a single routing queue are inserted as a single record in this table. Learn more about queues here: Precision Routing
Extraction Details
Purpose: Extracts data from MongoDB collection.
Source: MongoDB source to extract data is as follows:
routing-engine_db.precisionQueues
MongoDB Query:
{}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
queue_id |
| Object Id | Existing | Unique Id to identify this queue. |
queue_name |
| String | Existing | Records the queue name, any alphanumeric string. |
sl_type |
| Int | Existing | Service level type can have the following values:
|
sl_threshold |
| Int | Existing | Indicates the number of seconds in which a request must be routed to an agent. |
created_at |
|
| Custom | Records the date and time when this record is created. |
updated_at |
|
| Custom | Records the date and time when this record is updated. |
is_deleted |
|
| Custom | Indicates that the queue has been deleted from the system.(Used for soft deletion) |
Media Routing Domain
Media Routing Domains (MRDs) are configurations that define the routing of media types (e.g., voice, chat, email) within the contact center system. Learn more about MRDs here: Channel Categories (Media Routing Domains)
Extraction Details
Purpose: Extracts data from MongoDB collection.
Source: MongoDB source to extract data is as follows:
routing-engine_db.mediaRoutingDomains
MongoDB Query:
{}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
mrd_id |
| String | Existing | Unique Id to identify this MRD. |
mrd_name |
| String | Existing | Records the MRD name, any alphanumeric string. |
description |
| String | Existing | Short description of the media routing domain. |
max_task_request |
| Int | Existing | This is the max tasks that the MRD can receive. |
is_interruptible |
| Boolean | Existing | Tells whether a conversion of a specific media domain can be interrupted at the agent's end by a higher priority conversation. For instance, a chat conversation on WhatsApp can be interrupted by a voice call. On the contrary an ongoing voice call cannot be interrupted by a chat request. |
is_managed_by_re |
|
| Existing | When the value is true, it indicates that the Routing Engine is responsible for managing this MRD. Conversely, if the value is false, it means that other sources, such as Cisco, are in charge of managing this specific MRD. |
created_at |
|
| Custom | Records the date and time when this record is created. |
updated_at |
|
| Custom | Records the date and time when this record is updated. |
is_deleted |
|
| Custom | Indicates that the mrd has been deleted from the system.(Used for soft deletion) |
List
List records the properties of a routing queue. Whenever a human agent is required for a conversation, a request to assign an agent is created by the system and offered to a precision queue.
Extraction Details
Purpose: Extracts data from MongoDB collection.
Source: MongoDB source to extract data is as follows:
adminPanel.pullmodelists
MongoDB Query:
{}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
list_id |
| Object Id | Existing | Unique identifier for the list. |
list_name |
| String | Existing | Name of the list. |
created_at |
|
| Custom | Records the date and time when this record is created. |
updated_at |
|
| Custom | Records the date and time when this record is updated. |
is_deleted |
|
| Custom | Indicates that the list has been deleted from the system.(Used for soft deletion) |
MRD Type
MRD Type records the relevant data for an MRD configured in the system.
Extraction Details
Purpose: Extracts data from MongoDB collection.
Source: MongoDB source to extract data is as follows:
routing-engine_db.mrdTypes
MongoDB Query:
{}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
mrd_type_id |
| Object Id | Existing | Unique Id to identify this MRD type. |
mrd_type_name |
| String | Existing | Records the MRD type name, any alphanumeric string. |
is_managed_by_re |
| Boolean | Existing | When the value is true, it indicates that the Routing Engine is responsible for managing this MRD. Conversely, if the value is false, it means that other sources, such as Cisco, are in charge of managing this specific MRD. |
is_auto_join |
| Boolean | Existing |
|
is_interruptible |
| Boolean | Existing | Tells whether a conversion of a specific media domain can be interrupted at the agent's end by a higher priority conversation. For instance, a chat conversation on WhatsApp can be interrupted by a voice call. On the contrary an ongoing voice call cannot be interrupted by a chat request. |
created_at |
|
| Custom | Records the date and time when this record is created. |
updated_at |
|
| Custom | Records the date and time when this record is updated. |
is_deleted |
|
| Custom | Indicates that this mrd type has been deleted from the system. (Used for soft deletion) |
Transactional ETL Pipelines:
Conversation
A conversation entity records the customer's conversation details. A conversation consists of all channel sessions where a customer is conversing, the conversation participants (bots, agents, customers) and optionally also some conversation data.
See more about Conversations on Conversation Objects Unique id to identify this conversation
This table only records the essential conversation fields. There are separate tables for conversation data and conversation participants.
Extraction Details
Purpose: Uses an API of the historical reports manager component to fetch the required data.
Mongo DB Source:
conversation-manager_db.conversations
Query:
CODEdb["conversations"].find()
API URL:
<FQDN>/historical-reports/stats/conversation?endTime=1900-01-01T00:00:00.000Z&limit=100
Component Description: Makes a REST API call to fetch conversation data from the historical reports manager component.
Target Field | Source Field ( API / MongoDB ) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
conversation_id |
| ObjectId | Existing | Records the conversation id of the system. Directly assigned from the conversation entity. |
room_id (reserved for future) |
| Existing | Identifies the room this conversation is a part of. Currently, null since a conversation is not a part of any room. | |
customer_id |
| ObjectId | Existing | Unique identifier of the customer associated with the conversation. |
customer_name |
| String | Existing | Records the customer name with whom this conversation is associated. |
start_time |
| Date | Existing | Records the date and time when this conversation was started. |
end_time |
| Date | Existing | Records the date and time when this conversation was ended. |
conversation_duration |
| [INT] | Custom | Stores the total duration of the conversation, calculated as the difference between |
bot_id |
| String | Existing | Identifier of the bot who was a participant of this conversation. |
task_state |
| String | Custom |
|
reason_code |
| String | Custom |
|
disposition |
| String | Custom |
This is the reason why the conversation was closed. The details can be referenced from the document Task Reason Codes
|
direction |
| String | Existing | Records the direction of conversation i.e. INBOUND/OUTBOUND. There can be multiple channel sessions (INBOUND/OUTBOUND) in a conversation. We'll consider the conversation's direction based on the first channel session's direction in a conversation. |
Conversation Data
A conversation can have key-value pairs to record any arbitrary additional data required. This is known as the conversation data. A single key-value pair for a conversation is inserted as one record in this table.
See Conversation Data for more details.
Extraction Details
Purpose: Extracts data from MongoDB based on a specific query.
Source:
conversation-manager_db.conversations
MongoDB Query:
CODE{ "$and": [ { "conversationData": { "$exists": true, "$type": "object", "$ne": {} } } ] }
Field | Source Field ( API / MongoDB ) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
conversation_id |
| ObjectId | Existing | Identifies the conversation for which this conversation data record is inserted. |
key |
| String | Custom | Any alphanumeric value from conversationData Object. |
value |
| String | Custom | Any alphanumeric value from conversationData Object. |
record_creation_time |
| Date | Existing | Records the date and time when this conversation was ended. |
Conversation Participant
Conversation participants are the participants that take part in a conversation. For example , customers, bots and agents. Each record in the table represents a Conversation Participant.
Extraction Details
Purpose: Uses an API of the historical reports manager component to fetch the required data.
Source:
conversation-manager_db.CustomerTopicEvents
MongoDB Query:
{
"cimEvent.name": { $in: ["CHANNEL_SESSION_STARTED", "AGENT_SUBSCRIBED", "BOT_SUBSCRIBED"]}
}
API URL:
<FQDN>/historical-reports/stats/conversation/participant?endTime=<last_sync_time>&limit=100
Component Description: Makes a REST API call to fetch conversation participant data from the historical reports manager component.
Target Field | Source Field ( API / MongoDB ) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
id |
| [nvarchar](50) | Custom | A unique identification of a participation by agent/customer/bot etc. |
participant_id |
| String | Existing |
|
conversation_id |
| String | Existing |
|
participant_role (AGENT | CUSTOMER | EXTERNAL) |
| String | Custom | Indicates the role of a participant in the conversation
Derived from Role is determined as follows: |
record_creation_time |
| Timestamp | Existing | Assigned based on |
Conversation Hold Resume
This records the details and properties of the conversations that were put on hold and later resumed capturing key details such as the time of hold and resume events, and the agent or channel session interaction involved.
Extraction Details
Purpose: Extracts data from MongoDB collection based on a specific query.
Source: MongoDB source to extract data is as follows:
conversation-manager_db.CustomerTopicEvents
MongoDB Query:
{ 'cimEvent.name': 'CALL_HOLD' }
Target Field | Source Field ( API / MongoDB ) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
conversation_id |
| String | Existing | Unique identifier for the conversation, linking it to the main conversation table. |
conversation_state |
| String | Custom | Indicates the state of the conversation (e.g., HOLD, RESUME).
|
agent_id |
| String | Existing | Unique identifier to identify the agent part of the conversation. |
event_timestamp |
| Date | Existing | Timestamp of the hold or resume event in the conversation. |
channel_session_id |
| Object Id | Existing | Identifies the channel session for the conversation. |
Agent Task
This records the details of specific agent tasks. Agent task can contain details about task queue time, task end time, task state, direction, routing mode etc.
Purpose: The purpose of this job is to compute agent tasks. During a conversation, when a task is RESERVED for an agent, an agent is assigned to that conversation. The system processes various task states and task media states to compute agent tasks. The task states include ACTIVE, WRAP_UP, and CLOSED, while the task media states include QUEUED, RESERVED, ACTIVE, and CLOSED.
Learn more about Agent Task : Agent Task/Routing Task
This job has multiple sub jobs:
For PUSH mode:
PUSH Task - QUEUED
PUSH Task - RESERVED
PUSH Task - ACTIVE
PUSH Task - CLOSED
For PULL mode:
PULL Task - ACTIVE
PULL Task - CLOSED
Extraction Details
Purpose: Extracts agent task data from MongoDB.
Source: MongoDB source to extract data is as follows:
conversation-manager_db.CustomerTopicEvents
.MongoDB Query: Each child ETL has different MongoDB query(s) to extract the data based on their routing mode and task media state.
For PUSH Task - QUEUED
{
$and: [{ 'cimEvent.name': 'TASK_STATE_CHANGED' },
{
'cimEvent.data.task.activeMedia': {
$elemMatch: {
'state': 'QUEUED'
}
}
},{ 'cimEvent.data.task.activeMedia.0.requestSession.channel.channelConfig.routingPolicy.routingMode': 'PUSH'}
]
}
For PUSH Task - RESERVED
{
$and: [{ 'cimEvent.name': 'TASK_STATE_CHANGED' },
{
'cimEvent.data.task.activeMedia': {
$elemMatch: {
'state': 'RESERVED'
}
}
},{ 'cimEvent.data.task.activeMedia.0.requestSession.channel.channelConfig.routingPolicy.routingMode': 'PUSH'}
]
}
For PUSH Task - ACTIVE
{
$and: [{ 'cimEvent.name': 'TASK_STATE_CHANGED' },
{
'cimEvent.data.task.activeMedia': {
$elemMatch: {
'state': 'ACTIVE'
}
}
},{ 'cimEvent.data.task.activeMedia.0.requestSession.channel.channelConfig.routingPolicy.routingMode': 'PUSH'}
]
}
For PUSH Task - CLOSED
{
$and: [{ 'cimEvent.name': 'TASK_STATE_CHANGED' },
{
'cimEvent.data.task.activeMedia': {
$elemMatch: {
'state': 'CLOSED'
}
}
},{ 'cimEvent.data.task.activeMedia.0.requestSession.channel.channelConfig.routingPolicy.routingMode': 'PUSH'}
]
}
For PULL Task - ACTIVE
{
$and: [{ 'cimEvent.name': 'TASK_STATE_CHANGED' },
{
'cimEvent.data.task.activeMedia': {
$elemMatch: {
'state': 'ACTIVE'
}
}
},{ 'cimEvent.channelSession.channel.channelConfig.routingPolicy.routingMode': 'PULL'}
]
}
For PULL Task - CLOSED
{
$and: [{ 'cimEvent.name': 'TASK_STATE_CHANGED' },
{
'cimEvent.data.task.activeMedia': {
$elemMatch: {
'state': 'CLOSED'
}
}
},{ 'cimEvent.channelSession.channel.channelConfig.routingPolicy.routingMode': 'PULL'}
]
}
Target Field | Source Field ( MongoDB ) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
agent_task_id |
| Object Id | Existing | Unique id to identify this task. |
conversation_id |
| String | Existing | Identifies the conversation this task is created for. |
agent_id |
| String | Existing | Identifies the agent which was assigned to this task. If the task was ended while in the QUEUED state then this field is NULL. |
task_queue_time |
| DATETIME | Existing | Records the date and time when the task is offered to a routing queue. This field is NULL in following cases when queue is not involved:
|
task_reserved_time |
| DATETIME | Records the date and time when an agent is reserved for this task. This field is NULL in following cases :
| |
task_answered_time |
| DATETIME | Existing | Records the date and time when the reserved agent accepts the task. This field is NULL in the following cases :
|
queue_id |
| String | Existing | Identifies the queue in which this task is enqueued for routing. This field is NULL in following cases :
|
list_id |
| String | Existing | Identifies the routing list/queue. |
task_end_time |
| DATETIME | Existing | Records the date and time when the task was ended/closed. |
task_disposition |
| String | Existing | This is basically the reason why the task was ended.
|
record_creation_time |
| Date | Existing | Records the date and time when the record is created in source DB i.e. MongoDB |
mrd_id |
| String | Existing | Unique Id to identify the MRD through which this task is created. |
customer_id |
| Object Id | Existing | Unique identifier of the customer this task is created for. |
customer_name |
| String | Existing | Name of the customer this task is created for. |
task_state_name |
| String | Existing | This records the state of the task. The state can be:
|
task_media_state |
| String | Existing | This records the media state of the task. The state can be:
|
task_direction |
| String | Existing | This records the direction how the task was created. The directions can be one of the following.
|
task_mode |
| String | Existing | This records the mode how the task was created. The mode can be one of the following.
|
routing_mode |
| String | Existing | This records one of the following routing modes.
|
channel_session_id |
| Object Id | Existing | A unique identifier for channel session associated with this task. |
Channel Session
A channel session instance is created when a customer's new chat session is started on a particular channel, such as WhatsApp or SMS. Each chat session on different channels results in a new channel session instance. The channel session instance ends when the chat is over on the associated channel. A customer can converse on multiple channels at a time in one conversation.
Extraction Details
Purpose: Uses an API of the historical reports manager component to fetch the required data.
Source: API
API URL:
https://<FQDN>//historical-reports/stats/channelSession?endTime=<channel_session_last_sync>&limit=<context.batch_size>
Component Description: This retrieves conversation events (like start, end, messages) using a helper method. It limits the query by
endTime
andlimit
, and filters by specific event types:CHANNEL_SESSION_STARTED
CHANNEL_SESSION_ENDED
CUSTOMER_MESSAGE
BOT_MESSAGE
AGENT_MESSAGE
Collection:
conversation-manager_db.CustomerTopicEvents
Mongo DB Query:
{"cimEvent.name": {"$in": ["CHANNEL_SESSION_STARTED", "CHANNEL_SESSION_ENDED"]}}
Target Field | Source Field (API/MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
session_id |
| String | Existing | Unique id to identify this channel session. |
conversation_id |
| String | Existing | Records the conversation id of the channel session. Directly assigned from the conversation entity. |
channel_id |
| String | Existing | Identifies the channel, this channel session is associated to. |
channel_customer_identifier |
| String | Existing | Channel customer identifier extracted from |
start_time |
| DateTime | Existing |
|
end_time |
| DateTime | Existing |
|
total_session_duration | Int | Custom | Stores the total duration of the channel session, calculated as the difference between | |
disposition |
| String | Existing | Indicates the reason why the channel session was closed.
|
bot_acitivity_count |
| Int | Custom |
|
agent_activity_count |
| Int | Custom |
|
customer_activity_count |
| Int | Custom |
|
avg_bot_confidence_level | Int | Custom | For each bot response, there is a percentage value that tells how confidently the bot was able to answer the customer’s query. This field gives the average value for all bot-confidence values. For now it is hardcoded to 0.1. | |
device |
| String | Existing |
|
browser_type |
| String | Existing |
|
country |
| String | Existing |
|
language |
| String | Existing |
|
record_creation_time |
| DateTime | Existing | Records the date and time when the record is created in the source DB i.e. MongoDB. |
Agent State
This records the details of an agent's state at a particular instance. The agent state data provides information about the current state of the agent including the duration held in each of the states.
Extraction Details
Purpose: Extracts data from MongoDB records based on a specific query.
Source: MongoDB source to extract data is as follows:
state-events-logger_cx_db.agentStateChangeEvents
MongoDB Query:
{'name': 'AGENT_STATE_CHANGED', 'data.agentStateChanged': true}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
login_date_time |
| Date | Existing | Records the date and time when the agent logged in. |
agent_id |
| String | Existing | Unique ID to identify the agent. |
agent_state |
| String | Existing | Records the Agent state. Agent state can be:
|
reason_code |
| String | Existing | Records the reason why agent switched states. For example , SHORT_BREAK , TIME_OFF, Out of office. |
duration | Custom |
| ||
state_change_time |
| Date | Existing | Records the date and time when the agent state was changed. |
Agent MRD State
This records the details of an agent's MRD state at a particular instance. The MRD state data provides information about the states of different media routing domains that the agent is handling. The duration of the states is also recorded, with specific values indicating the current state or logout events.
Extraction Details
Purpose: Extracts data from MongoDB records based on a specific query.
Source: MongoDB source to extract data is as follows:
state-events-logger_cx_db.agentStateChangeEvents
MongoDB Query:
{ $or: [{$and: [{ "name": "AGENT_STATE_CHANGED" }, { "data.agentStateChanged": false }]},{ $and: [{ "name": "AGENT_STATE_CHANGED" }, { "data.agentStateChanged": true }, { "data.agentPresence.state.name": { $ne: "READY" } }]}]}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
agent_id |
| String | Existing | Unique ID to identify the agent |
mrd_id |
| String | Existing | Identifies the MRD this MRD state is associated to |
login_date_time |
| Date | Existing | Records the date and time when the MRD state changed to login. |
agent_mrd_state |
| String | Existing | Records the MRD state of an agent. |
duration | Custom |
| ||
state_change_time |
| Date | Existing | Records the date and time when the agent MRD state was changed. |
Wrapup Detail
This is responsible to process wrap-ups associated with conversations handled by agents. Wrap-ups are concluding notes added to conversations to summarize what the conversation was about. Agents can provide wrap-ups during or after the conversation, and they can also add notes independently at any time.
Extraction Details
Purpose: Extracts data from MongoDB based on a specific query.
Source: MongoDB source to extract data is as follows:
conversation-manager_db.CustomerTopicEvents
MongoDB Query:
{$and: [{ "cimEvent.data.body.type": "WRAPUP" }, {"cimEvent.data.body.wrapups": {$exists: true, $type: "array", $ne: []}}]}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
wrapup_time |
| Date | Existing | Records the time when the wrap-up was applied. |
conversation_id |
| String | Existing | Identifies the conversation to which the wrap-up was applied. |
category_name |
| String | Existing | Records the wrap-up category. |
wrapup_label |
| String | Existing | Records the wrap-up label for the applied wrap-up. |
agent_id |
| String | Existing | Identifies the agent who applied the wrap up(s) on the conversation. |
notes |
| String | Existing |
|
record_creation_time |
| Date | Existing | Records the date and time when the record is created in the source DB i.e. MongoDB. |
IVR
IVR records the IVR activity of the solution. It loads data from the IVR_AGGREGATED_ACTIVITY
event into the database.
Extraction Details
Purpose: Extracts data from MongoDB based on a specific query.
Source: MongoDB source to extract data is as follows:
conversation-manager_db.CustomerTopicEvents
MongoDB Query:
{ "cimEvent.type": "ACTIVITY", "cimEvent.name": "IVR_AGGREGATED_ACTIVITY"}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
conversation_id |
| String | Existing | Identifies the conversation for which the IVR was used. |
help_line |
| String | Existing | Identifies the Service being used by the customer. |
start_date_time |
| Date | Existing | Date and time when the IVR conversation was started. |
caller_number |
| String | Existing | Shows the phone number of the customer part of this IVR conversation. |
main_menu_selection |
| String | Existing | The option selected by the customer on the main menu of the IVR menu. |
sub_menu_option_selected |
| String | Existing | The option selected by the customer on the sub menu of the IVR main menu. |
journey | Custom | |||
selection |
| String | Existing |
|
duration | Custom |
| ||
language |
| String | Existing | Language used for the IVR call. |
call_id |
| String | Existing | Unique identifier to identify the call. |
end_date_time |
| Date | Existing | Date and time when the IVR conversation was ended. |
start_direction |
| String | Existing | Records the start direction of channel session used for the call i.e. INBOUND/OUTBOUND. |
call_disposition |
| String | Existing | Records the reason why the IVR call was ended. The reason could be any one of the following:
|
record_creation_time |
| Date | Existing | Records the date and time when the record is created in the source DB i.e. MongoDB. |
Forms
Forms records the data generated by filling forms of surveys. The target table of the ETL records the submitted forms data coming from the conversation_manager_db of mongodb within the CustomerTopicEvents collection. The objects are filtered based on their cimEvent, which corresponds to “FORMS_DATA,” which is further transformed and loaded into a table whose schema details are as follows. Learn more about forms here Forms
Extraction Details
Purpose: Extracts data from MongoDB based on a specific query.
Source: MongoDB source to extract data is as follows:
conversation-manager_db.CustomerTopicEvents
MongoDB Query:
{"cimEvent.data.body.type": "FORM_DATA"}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
row_id | Custom | Primary-Key: Hashing Field to implement upserting in table. | ||
conversation_id |
| String | Existing | Unique identifier for the conversation, linking it to the main conversation table. |
channel_session_id |
| String | Existing | Unique identifier for the communication session related to the conversation. |
channel_customer_identifier |
| String | Existing | identifier for the channel from where customer is coming. |
service_indentifier |
| String | Existing | Unique identifier like a phone number or URL associated to the customer. |
customer_id |
| Object Id | Existing | Unique identifier for the customer. |
customer_is_anonymous |
| Boolean | Existing |
|
customer_first_name |
| String | Existing | Records the customer’s name from the customer object. |
room_id |
| Object Id | Existing | Unique identifier for the room used for the conversation, linking it to the main rooms table. |
activity_id |
| String | Existing | Unique identifier for the activity. |
form_id |
| String | Existing | Unique identifier for the submitted forms. |
form_type |
| String | Existing | Type of form submitted by the customer e.g. Survey. |
form_title |
| String | Existing | Title of the submitted form. |
form_weightage |
| Null | Existing | Represents the overall weightage assigned to a form in a survey or assessment. |
enable_weightage |
| Boolean | Existing |
|
intent |
| String | Existing | Scope of the submitted form activity. |
sentiment_result |
| Null | Existing | Stores the sentiment analysis result, typically reflecting the emotional tone of the response. |
sender_id |
| String | Existing | Unique identifier for the agent that sent the form. |
sender_type |
| String | Existing |
|
sender_name |
| String | Existing | Name of the sender. |
section_id |
| String | Existing | Unique identifier for the sections of form. |
section_name |
| String | Existing | Name of the section. |
section_weightage |
| Null | Existing | Weightage assigned to a specific section within a form or survey. |
attribute_id |
| String | Existing | Unique identifier for the attributes. |
attribute_type |
| String | Existing |
|
attribute_label |
| String | Existing | Label of the section on the form. |
attribute_weightage |
| Null | Existing | Weightage assigned to individual attributes within a form or survey section. |
value_type |
| String | Existing |
|
skip_type |
| Null | Existing | Specifies the condition or rule under which a question or section can be skipped in a form or survey. |
answer_label |
| String | Existing | Output labels associated with each section. |
answer_value |
| String | Existing | Answer submitted for each section. |
is_selected |
| Boolean | Existing | Boolean field showing if any option was selected in each section of the form. |
option_weightage |
| Int | Existing | Percentage that each option of the form. |
timestamp |
| Date | Existing | Time when the record is created. |
recordCreationTime |
| Date | Existing | Time when the record was created in the source DB i.e. MongoDB. |
etl_inserted_at | Custom | Records the time and date when the ETL job was run. | ||
tenant_id | Existing | Records the tenant id/name. |
Survey Distribution
Survey distributions records the survey created and sent to each conversation.
Extraction Details
Purpose: Extracts data from MongoDB collection.
Source: MongoDB source to extract data is as follows:
surveydb.surveydistributions
MongoDB Query:
{}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
id |
| Object Id | Existing | MongoDB Object id. |
survey_id |
| Object Id | Existing | Unique identifier for the survey. |
form_id |
| String | Existing | Unique identifier for the submitted form. |
customer_id |
| String | Existing | Unique identifier for the customer who received the survey. |
activity_message |
| String | Existing | Message that is sent when the chat has ended. |
deleted |
| Boolean | Existing |
|
created_at |
| Date | Existing | Records the date and time of when the survey was created. |
updated_at |
| Date | Existing | Records the date and time of when the survey was updated. |
etl_inserted_at | Custom | Records the time and date when the ETL job was run. | ||
tenant_id | Existing | Records the tenant id/name. |
Teams
This records the teams and their respective details configured in CX. These details include team name, team supervisor id, created by etc.
Extraction Details
Purpose: Extracts data from MongoDB collection.
Source: MongoDB source to extract data is as follows:
adminPanel.teams
MongoDB Query:
{}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
team_id |
| String | Existing | Unique identifier for teams. |
team_name |
| String | Existing | Name of the team. |
supervisor_id |
| String | Existing | Unique identifier for supervisor of the respective team. |
source |
| String | Existing | |
created_by |
| String | Existing |
|
created_at |
| Date | Existing | Records the date and time of when the team was created. |
updated_at |
| Date | Existing | Records the date and time of when the team was updated. |
_etl_inserted_at | Custom | Records the time and date when the ETL job was run. | ||
tenant_id | Existing | Records the tenant id/name. |
Team Members
Records the details of each agent of each team the agent is a part of.
Extraction Details
Purpose: Extracts data from MongoDB collection.
Source: MongoDB source to extract data is as follows:
adminPanel.teammembers
MongoDB Query:
{}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
id |
| Object Id | Existing | Unique identifier for the mongodb document. |
team_id |
| String | Existing | Unique identifier for the team. |
type |
| String | Existing | Type of person e.g. agent, secondary-supervisor. |
username |
| String | Existing | Username of person. |
user_id |
| String | Existing | Unique identifier for person. |
created_at |
| Date | Existing | Records the date and time of when the team member was assigned to the team. |
updated_at |
| Date | Existing | Records the date and time of when the team member details were updated. |
etl_inserted_at | Custom | Records the time and date when the ETL job was run. | ||
tenant_id | Existing | Records the tenant id/name. |
Voice Activities
A voice activity records the voice conversation details. This can include the start and end time of the conversation, call legs information, customer information, channel session information etc.
Extraction Details
Purpose: Extracts data from MongoDB based on a specific query.
Source: MongoDB source to extract data is as follows:
conversation-manager_db.conversationActivities
MongoDB Query:
{"activity.name": "VOICE_ACTIVITY"}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
row_id |
| Custom | Primary-Key: Hashing Field to implement upserting operation to prevent loading duplicate data. | |
id |
| Object ID | Existing | Unique identifier for mongo db record. |
customer_id |
| Object Id | Existing | Identifies the customer who is part of this conversation. |
conversation_id |
| Object Id | Existing | Identifies the conversation for this voice activity. |
channel_session_id |
| Object Id | Existing | Identifies the channel session for the activity. |
channel_session_direction |
| String | Existing |
|
channel_id |
| Object ID | Existing | Identifies the channel for which the conversation was initiated |
channel_name |
| String | Existing | Extracts the channel name, that the voice activity is a part of. |
channel_customer_identifier |
| String | Existing | Identifier for the channel from where customer is coming. |
service_identifier |
| String | Existing | Unique identifier like a phone number or URL associated to the customer. |
tenant_id |
| Object ID | Existing | Unique identifier for the associated tenant of a conversation. |
customer |
| Object | Existing | A JSON object containing all the customer associated details from a conversation including customer id, name, phone number, etc. |
room_id |
| Object Id | Existing | Identifies the room this conversation is a part of. |
activity_id |
| Object Id | Existing | Identifies the activity this conversation is a part of. |
activity_name |
| String | Existing | Extracts the name of the activity, the conversation is a part of. |
activity_timestamp |
| Date | Existing | Extracts the date and time, when the activity was performed. |
event_emitter_id |
| Object Id | Existing | Identifies the event emitter this conversation is a part of. |
event_emitter_type |
| String | Existing | Records the type of the event emitter. |
state_name |
| String | Existing |
|
state_reason_code |
| String | Existing | Reason code for the change of state for the channel session. |
start_time |
| Date | Existing | Records the date and time when this conversation was started. |
end_time |
| Date | Existing | Records the date and time when this conversation was ended. |
total_duration |
| Int64 | Existing | Total duration of the conversation. |
conversation_hold_time |
| Double | Existing | Records the total hold time of the conversation. |
sender_id |
| String | Existing | Identifies the sender of the activity from the sender object in the call legs array. |
sender_type |
| String | Existing |
|
sender_name |
| String | Existing |
|
call_leg_start_direction |
| String | Existing |
|
call_leg_end_direction |
| String | Existing |
|
call_leg_start_time |
| Date | Existing |
|
call_leg_end_time |
| Date | Existing |
|
call_leg_duration |
| Int64 | Existing |
|
recordCreationTime |
| Date | Existing | Assigned based on |
timestamp |
| Date | Existing | Records the date and time of when the conversation was performed. |
_etl_inserted_at |
| Custom | Records the time and date when the ETL job was run. |
Voice Connector Activities
A voice connector activity records the voice connector conversation details. This can include the start and end time of the conversation, message details, channel details, scheduling meta data, status etc.
Extraction Details
Purpose: Extracts data from MongoDB based on a specific query.
Source: MongoDB source to extract data is as follows:
conversation-manager_db.conversationActivities
Mongo DB Query:
{"activity.eventEmitter.senderName": "CX-Voice-Connector"}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
activity_id |
| Object ID | Existing | Unique identifier to show the various activities performed by customers |
activity_name |
| String | Existing | Extracts the name of the activity, the conversation is a part of. |
activity_type |
| String | Existing | Extracts the type of the activity, the conversation is a part of. |
activity_timestamp |
| String | Existing | Extracts the date and time, when the activity was performed. |
event_emitter_id |
| String | Existing | Identifies the event emitter this conversation is a part of. |
event_emitter_type |
| String | Existing | Records the type of event emitter. |
sender_name |
| String | Existing |
|
customer_id |
| String | Existing | Unique identifier of the customer associated with the conversation. |
customer |
| Object | Existing | A JSON object containing all the customer associated details from a conversation including customer id, name, phone number, etc. |
channel_session_id |
| Object ID | Existing | Identifies the channel session for the activity. |
participant_type |
| String | Existing | Records the type of the channel session participant from the channelSession object. |
channel_id |
| Object ID | Existing | Identifies the channel for which the conversation was initiated |
tenant_id |
| Object ID | Existing | Unique identifier for the associated tenant of the conversation. |
channel_config_id |
| Object ID | Existing | Unique identifier for the associated channel config of the conversation. |
channel_connector_id |
| Object ID | Existing | Unique identifier for the associated channel connector of the conversation. |
channel_type_id |
| Object ID | Existing | Unique identifier for the channel type of the conversation. |
scheduling_meta_data |
| Object | Existing | JSON object containing all the scheduling meta data details from a conversation including the including date and time, campaign id, campaign type, gateway id, etc. |
activity_data_id |
| String | Existing | Identifies the activity this conversation is a part of. |
sender_id |
| String | Existing | Identifies the sender of the activity. |
sender_type |
| String | Existing | Extracts the type of the sender of the conversation from the sender object in the activity data object. |
channel_customer_identifier |
| String | Existing | Identifier for the channel from where customer is coming. |
service_identifier |
| String | Existing | Unique identifier like a phone number or URL associated to the customer |
message_type |
| String | Existing | Extracts the type of message sent to the customer for the voice activity. It can be:
|
message_id |
| String | Existing | Records the identifier for the message sent to the customer. |
message_text |
| Existing | Records the text of the message sent to the customer. | |
status |
| String | Existing | Extracts the status of the conversation. The status can be:
|
reason_code |
| String | Existing | Records the reason code of the conversation. Reason codes can be:
|
room_id |
| Object ID | Existing | Identifies the room of which this conversation is a part of. |
room_mode |
| String | Existing | Extracts the room mode from the roomInfo object. |
timestamp |
| Date | Existing | Records the date and time of the conversation. |
recordCreationTime |
| Date | Existing | Records the date and time when the data is pushed in mongodb. |
_etl_inserted_at |
| Custom | Records the time and date when the ETL job was run |
Campaigns
Campaigns records the campaigns added in the system along with their details. For more details on campaigns refer to the following document: https://expertflow-docs.atlassian.net/wiki/x/CQA8Fg?atlOrigin=eyJpIjoiNjRlZWQ1ZWE1NjhmNDVlZmEyNmZjNmJiMjFlMTg2MWUiLCJwIjoiYyJ9
Extraction Details
Purpose: Extracts data from MongoDB based on a specific query.
Source: MongoDB source to extract data is as follows:
campaignsDb.campaigns
MongoDB Query: None
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
id |
| Object ID | Existing | Unique identifier for mongo db record. |
flow_id |
| String | Existing | Unique identifier of the flow builder used to deploy the respective campaign. |
title |
| String | Existing | Name/title of the campaign. |
number_of_contacts |
| Int(32) | Existing | The number of contacts uploaded in the campaign. |
sources |
| Array | Existing | Stored an JSON object, records the identifiers of sources of the contacts in the campaign. |
status |
| String | Existing | Shows the status of the campaign. Campaigns can be:
|
created_at |
| Date | Existing | Extracts the date and time when the campaign was created. |
updated_at |
| Date | Existing | Extracts the date and time when the campaign was updated. |
version |
| Int(32) | Existing | Version |
_etl_inserted_at |
| Custom | Records the time and date when the ETL job was run. |
Campaign Scheduler
Campaigns scheulder records the data for the scheduled campaigns added in the system along with their details. This includes the customer information, channel session information, scheduling metadata etc. For more details on campaigns refer to the following document: https://expertflow-docs.atlassian.net/wiki/x/CQA8Fg?atlOrigin=eyJpIjoiNjRlZWQ1ZWE1NjhmNDVlZmEyNmZjNmJiMjFlMTg2MWUiLCJwIjoiYyJ9 .
Extraction Details
Purpose: Extracts data from MongoDB based on a specific query.
Source: MongoDB source to extract data is as follows:
conversation-manager_db.conversationActivities
MongoDB Query:
{"activity.eventEmitter.senderName": "CAMPAIGN_SCHEDULER"}
Target Field | Source Field (MongoDB) | Source Data Type | Field Type | Transformation Rules |
---|---|---|---|---|
activity_id |
| Object ID | Existing | Unique identifier to show the various activities performed by customers. |
name |
| String | Existing | Extracts the name of the activity, the conversation is a part of. |
type |
| String | Existing | Extracts the type of the activity, the conversation is a part of. |
activity_timestamp |
| Date | Existing | Extracts the date and time, when the activity was performed. |
event_emitter_id |
| Object Id | Existing | Identifies the event emitter this conversation is a part of. |
event_emitter_type |
| String | Existing | Records the type of the event emitter. |
sender_name |
| String | Existing | Extracts the name of the sender of the activity. In this case |
customer_id |
| String | Existing | Unique identifier of the customer associated with the conversation. |
customer |
| Object | Existing | A JSON object containing all the customer associated details from a conversation including customer id, name, phone number, etc. |
channel_session_id |
| Object ID | Existing | Identifies the channel session for the activity. |
participant_type |
| String | Existing | Records the type of the channel session participant. |
channel_id |
| Object ID | Existing | Identifies the channel for which the conversation was initiated. |
default_outbound |
| Boolean | Existing | Records whether the channel is by default set to Outbound or not. It is stored as Boolean value:
|
tenant_id |
| Object ID | Existing | Unique identifier for the associated tenant of the conversation. |
channel_config_id |
| Object ID | Existing | Unique identifier for the associated channel config of the conversation. |
channel_connector_id |
| Object ID | Existing | Unique identifier for the associated channel connector for the conversation. |
channel_type_id |
| Object ID | Existing | Unique identifier for the channel type used for the conversation. |
is_interactive |
| Boolean | Existing | Records whether the channel type is interactive or not. It is stored as Boolean value:
|
is_active |
| Boolean | Existing | Records whether the channel session is active or not. It is stored as Boolean value:
|
scheduling_meta_data |
| Object | Existing | JSON object containing all the scheduling meta data details from a conversation including the including date and time, campaign id, campaign type, gateway id, etc. |
activity_data_id |
| String | Existing | Identifies the activity data this conversation is a part of. |
sender_id |
| String | Existing | Identifies the sender. |
sender_type |
| String | Existing | Extracts the type of the sender of the conversation from the sender object in the activity data object. |
channel_customer_identifier |
| String | Existing | Identifier for the channel from where customer is coming. |
service_identifier |
| String | Existing | Unique identifier like a phone number or URL associated to the channel. |
message_type |
| String | Existing | Extracts the type of message sent to the customer. It can be:
|
messageId |
| String | Existing | Records the identifier for the message sent to the customer. |
message_text |
| String | Existing | |
status |
| String | Existing | Records the status of the message. It can be:
|
reason_code |
| String | Existing | Records the reason code of the conversation from the body object in the activity data object. |
call_id |
| String | Existing | Records the identifier for the call to the customer. |
room_id |
| Object ID | Existing | Identifies the room this conversation is a part of. |
room_mode |
| String | Existing | Extracts the room mode from the roomInfo object. |
timestamp |
| Date | Existing | Records the date and time of the conversation. |
recordCreationTime |
| Date | Existing | Records the date and time when the data is pushed in mongodb. |
_etl_inserted_at |
|
| Custom | Records the time and date when the ETL job was run. |