Data Migration-Structural Changes (CX4.4.x-CX4.5)
The primary changes from CX4.4.x to CX4.5 can be reviewed from the Release Notes. However, from a technical perspective, this document outlines the major structural changes required to perform in CX4.4.x-based data to migrate it successfully to CX4.5.
Conversation Manager DB
There is an addition of 1 new collection under Conversation Manager DB (conversation-manager_db) named:
rooms
To know more about rooms, you can refer to the release document for a detailed description.
DB:conversation-manager_db
In [4.4] Collections were: | In [CX4.5] Collections are: |
---|---|
|
|
|
|
|
|
|
In
conversations
collection,roomInfo
is added in each conversation document at root level. Sample difference in payload is mentioned below:
In [4.4] | In [4.5] |
---|---|
CODE
|
CODE
|
In the
CustomerTopicEvents
collection, multiple types of events exist. Common changes in all events are the addition ofroomId
androomInfo
at different points of the document.
For all the events, theroomId
attribute is added at the root level of an event with the room id. Also, theroomInfo
attribute is added at the root level of thecimEvent
attribute. Additionally, if thecimEvent
attribute contains thechannelSession
attribute as well, thenroomInfo
is also added at the root level of it.document.roomId = <roomInfo-Id>;
document.cimEvent.roomInfo = { _id: <roomInfo-Id>, mode: "CONTACT_CENTER" };
document.cimEvent.channelSession.roomInfo = { _id: <roomInfo-Id>, mode: "CONTACT_CENTER" };
Other than this, there are some new attributes as well that are added in different events. Lets review each type of documents below:For event with name
CHANNEL_SESSION_STARTED
andCHANNEL_SESSION_ENDED
andCHANNEL_SESSION_EXPIRED
document.cimEvent.data.roomInfo = {
id: <roomInfo-Id>,
mode: "CONTACT_CENTER"
};
For event with name
REMOVE_CHANNEL_SESSION
document.cimEvent.data.channelSession.roomInfo = {
id: <roomInfo-Id>,
mode: "CONTACT_CENTER"
};
For event with name
TOPIC_STATE_CHANGE_EVENT
document.cimEvent.data.roomInfo = {
id: <roomInfo-Id>,
mode: "CONTACT_CENTER"
};
document.cimEvent.data.agentSla = {
totalDuration: null,
action: null,
startTime: null
};
document.cimEvent.data.holdTimerDetails = {
totalDuration: null,
startTime: null
};
document.cimEvent.data.cachedAgentSlaDuration = 0;
document.cimEvent.data.channelSession.roomInfo = {
id: <roomInfo-Id>,
mode: "CONTACT_CENTER"
};
document.cimEvent.data.metadata.lastUsedChannelSession.roomInfo = {
id: <roomInfo-Id>,
mode: "CONTACT_CENTER"
};
Also, the attribute
event.cimEvent.data.metadata.agentRequestStatus
is deleted from this event’s data.
For event with name
TASK_STATE_CHANGED
, now there are 2 items in task.Task
andTaskMedia
. OneTask
can contain more than oneTaskMedia
. The details of all the changes related to Task changes can be found in Release Notes. However, the data migration related difference inTASK_STATE_CHANGED
event is mentioned below:
In [4.4] TASK_STATE_CHANGED was: | In [4.5] TASK_STATE_CHANGED is: |
---|---|
CODE
|
CODE
|
e. For event with name TASK_ENQUEUED
and AGENT_RESERVED
, the changes related to its data is mentioned below:
In [4.4] TASK_ENQUEUED and AGENT_RESERVED was: | In [4.5] TASK_ENQUEUED and AGENT_RESERVED is: |
---|---|
CODE
|
CODE
|
In
ConversationActivities
collection, there are multiple types of activities that exists. Common changes in all activities is the addition ofroomId
androomInfo
at different points of the document.For all the activities,
roomId
attribute is added at root level of activity with the room id. Also,roomInfo
attribute is added at root level ofactivity
attribute. Additionally, if theactivity
attribute containschannelSession
attribute as well, thenroomInfo
is also added at root level of it.document.roomId = <roomInfo-Id>;
document.activity.roomInfo = { _id: <roomInfo-Id>, mode: "CONTACT_CENTER" };
document.activity.channelSession.roomInfo = { _id: <roomInfo-Id>, mode: "CONTACT_CENTER" };
Other than this, there are some new attributes as well that are added in different activities. Lets review each type of activities below:
For activity with name
CHANNEL_SESSION_STARTED
andCHANNEL_SESSION_ENDED
andCHANNEL_SESSION_EXPIRED
document.activity.data.roomInfo = {
id: <roomInfo-Id>,
mode: "CONTACT_CENTER"
};
For activity with name
REMOVE_CHANNEL_SESSION
document.activity.data.channelSession.roomInfo = {
id: <roomInfo-Id>,
mode: "CONTACT_CENTER"
};
For activity with name
TOPIC_STATE_CHANGE_EVENT
document.activity.data.roomInfo = {
id: <roomInfo-Id>,
mode: "CONTACT_CENTER"
};
document.activity.data.agentSla = {
totalDuration: null,
action: null,
startTime: null
};
document.activity.data.holdTimerDetails = {
totalDuration: null,
startTime: null
};
document.activity.data.cachedAgentSlaDuration = 0;
document.activity.data.channelSession.roomInfo = {
id: <roomInfo-Id>,
mode: "CONTACT_CENTER"
};
document.activity.data.metadata.lastUsedChannelSession.roomInfo = {
id: <roomInfo-Id>,
mode: "CONTACT_CENTER"
};
Also, the attribute
document.activity.data.metadata.agentRequestStatus
is deleted from this activity’s data.
For activity with name
TASK_STATE_CHANGED
, again, now there are 2 items in task.Task
andTaskMedia
. OneTask
can contain more than oneTaskMedia
. The details of all the changes related to Task changes can be found in Release Notes. However, the data migration related difference inTASK_STATE_CHANGED
activity is mentioned below:
In [4.4] TASK_STATE_CHANGED was: | In [4.5] TASK_STATE_CHANGED is: |
---|---|
CODE
|
CODE
|
e. For event with name TASK_ENQUEUED
and AGENT_RESERVED
, the changes related to its data is mentioned below:
In [4.4] TASK_ENQUEUED and AGENT_RESERVED was: | In [4.5] TASK_ENQUEUED and AGENT_RESERVED is: |
---|---|
CODE
|
CODE
|
Routing Engine DB
DB: routing-engine_db
mrdTypes
collection is added which contains the MRD types. The already defined MRD Types areCHAT
CX_VOICE
CISCO_CC
only. All MRDs now must belongs to any of MRD Type.A
type
attribute is added,interruptible
andmanagedByRe
is removed from eachMRD
document frommediaRoutingDomains
collection as mentioned in the payload below.
In [4.4] MRD payload was: | In [4.5] MRD payload is: |
---|---|
CODE
|
CODE
|
In
precisionQueues
collection,agentSlaDuration
attribute is added at the root level.
Admin Panel DB
DB: adminPanel
In
pullmodelists
collection,agentSlaDuration
attribute is added at root level with120
as default value.In
agentdesksettings
collection,isAutoAnswerEnabled
attribute is added at root level withfalse
as default value.