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:
roomsTo 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
conversationscollection,roomInfois 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
CustomerTopicEventscollection, multiple types of events exist. Common changes in all events are the addition ofroomIdandroomInfoat different points of the document.
For all the events, theroomIdattribute is added at the root level of an event with the room id. Also, theroomInfoattribute is added at the root level of thecimEventattribute. Additionally, if thecimEventattribute contains thechannelSessionattribute as well, thenroomInfois 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_STARTEDandCHANNEL_SESSION_ENDEDandCHANNEL_SESSION_EXPIREDdocument.cimEvent.data.roomInfo = {
id: <roomInfo-Id>,
mode: "CONTACT_CENTER"};
For event with name
REMOVE_CHANNEL_SESSIONdocument.cimEvent.data.channelSession.roomInfo = {
id: <roomInfo-Id>,
mode: "CONTACT_CENTER"};
For event with name
TOPIC_STATE_CHANGE_EVENTdocument.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.agentRequestStatusis deleted from this event’s data.
For event with name
TASK_STATE_CHANGED, now there are 2 items in task.TaskandTaskMedia. OneTaskcan 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_CHANGEDevent 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
ConversationActivitiescollection, there are multiple types of activities that exists. Common changes in all activities is the addition ofroomIdandroomInfoat different points of the document.For all the activities,
roomIdattribute is added at root level of activity with the room id. Also,roomInfoattribute is added at root level ofactivityattribute. Additionally, if theactivityattribute containschannelSessionattribute as well, thenroomInfois 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_STARTEDandCHANNEL_SESSION_ENDEDandCHANNEL_SESSION_EXPIREDdocument.activity.data.roomInfo = {
id: <roomInfo-Id>,
mode: "CONTACT_CENTER"};For activity with name
REMOVE_CHANNEL_SESSIONdocument.activity.data.channelSession.roomInfo = {
id: <roomInfo-Id>,
mode: "CONTACT_CENTER"};
For activity with name
TOPIC_STATE_CHANGE_EVENTdocument.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.agentRequestStatusis deleted from this activity’s data.
For activity with name
TASK_STATE_CHANGED, again, now there are 2 items in task.TaskandTaskMedia. OneTaskcan 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_CHANGEDactivity 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
mrdTypescollection is added which contains the MRD types. The already defined MRD Types areCHATCX_VOICECISCO_CConly. All MRDs now must belongs to any of MRD Type.A
typeattribute is added,interruptibleandmanagedByReis removed from eachMRDdocument frommediaRoutingDomainscollection as mentioned in the payload below.
In [4.4] MRD payload was: | In [4.5] MRD payload is: |
|---|---|
CODE
|
CODE
|
In
precisionQueuescollection,agentSlaDurationattribute is added at the root level.
Admin Panel DB
DB: adminPanel
In
pullmodelistscollection,agentSlaDurationattribute is added at root level with120as default value.In
agentdesksettingscollection,isAutoAnswerEnabledattribute is added at root level withfalseas default value.