1

Understanding Data Migration

Overview

Data Migration is the process of moving your older data  ( belonging to version1.48 or earlier) to the newer version (1.49 or later).

It helps you build conversations out of the older data in your Converse Desk. It is not a mandatory step and Organizations that do not require their older data may not perform this activity.

User Profiles for Migration

All customers with SMS-Magic Interact 1.48 or less can migrate to SMS-Magic Converse 1.50 and later versions. Migration process can be handled only by users with Admin profiles.

Prerequisites

  • Only Admin users can migrate Data.
  • No active process flows, workflow or trigger should be running to update the SMS history.
  • All Validation rules for Incoming SMS and SMS History tables should be disabled.

Configure Global Settings

You need to enable the following permissions in the Global Settings Setup page:

  • IsDataMigrationAccessible – This should be selected in order to run Migration scripts.
  • Use Single message object – This should be selected to ensure that SMS history object records both incoming and outgoing messages.



To Launch Data Migration

  1. On the Setup page, search for Visualforce Pages.
  2. Under the Visualforce page, click DataMigration.
  3. Under DataMigration Visual Force page, click preview.
  4. The Data Migration for Converse Desk page appears listing the Migration Jobs.
  5. Run individual scripts to launch Data Migration.



Re-run Failed Scripts

The following procedure helps you understand how to rerun a failed data migration script:

1.On the Data Migration Job page, right -click against the failed script and click Inspect from the drop-down menu that appears. The console section appears.

datamigration

2.Under Sources, search for the file DataMigration.js.

3.Select the file displaying all the batch details.

4.Scroll down to Line number 61 to view the list of all batches that have run. The LastBatchID attribute displays the name of the last batch that was run.

5. Click to add a debugger on the line. The script pauses.

datamigration page

6. Click the ApexJobList attribute to view the jobs that are executed. The Array 1 job list box appears.

datamigration pager inspect

7.On the right panel, under Watch click the  — that appears next to the jobs to empty the job list.

8.Click + to add a new expression.

9.Type

apexJobList = [ ] .

Click . This enables the Run Script button on the Migration jobs as shown.

datamigration jobs



Migration Checklist

The table below provides a detail view of the scripts that need to be run during Migration:

For customer orgs having huge data sets we need to index the senderId and unformatted mobileNumber field.

Step No

This script helps to

This script should be run because

Do not run this script if

Precaution

Post-run checks

1

Update status of outgoing messages

 

To show normalized status of an outgoing message.

If SMS history object has incoming messages.

If there are any active process flow, workflow or triggers which run on update of SMSMagic__c object

Before you run the batch, ensure that there is no active process flow, workflow or trigger running on update of SMS history.

Ensure you are the admin

Ensure that you have access to all the fields and objects (Give permission set)

Ensure that you have disabled Send SMS from the admin portal.

Disable validation rule on SMS History.

Ensure MOC settings are properly done.

none

2

Update direction

To update newly introduced direction field and set value of OUT on previously created outgoing messages.

SMS history object has any incoming messages.

There are active process flow, workflow or triggers which run on update of SMSMagic__c object

 

Before you run the batch, ensure that there is no active process flow, workflow or trigger running on update of SMS history.

Ensure you are the admin.

Ensure that you have access to all the fields and objects (Give permission set).

Ensure that you’ve disabled Send SMS from admin portal.

Disable validation rule on SMS History.

none

3

Update Unformatted phone numbers

To update newly introduced Unformatted phone field on previously created outgoing messages.

This field is used for lookup in new logic and should be updated.

If there are any active process flow, workflow or triggers which run on update of SMSMagic__c object

Before you run the batch, ensure that there is no active process flow, workflow or trigger running on update of SMS history.

Ensure you are the admin

Ensure that you have access to all the fields and objects (Give permission set)

Ensure that you have disabled Send SMS from admin portal

none

4

Update Sender id

none

There are few sender ids and it can be done manually

none

Verify if the sender ids have correct value of Used for field. If not, update manually.

5

Update Primary object on incoming.

If you have incoming messages in Incoming_SMS__c object and you want the old messages to be available in conversations

If there are active process flow, workflow or triggers which run on update of Incoming_SMS__c object

Before you run the batch, ensure that there is no active process flow, workflow or trigger running on update of Incoming_SMS__c object

Ensure you are the admin

Ensure that you have access to all the fields and objects (Give permission set)

Ensure that you have disabled Send SMS from admin portal

none

6

Update primary object on inbound messages

If you have incoming messages in SMSMagic__c object and you want the old messages to be available in conversations

If there are active process flow, workflow or triggers which run on update of SMSMagic__c object

Before you run the batch, ensure that there is no active process flow, workflow or trigger running on update of SMS history.

Ensure you are the admin

Ensure that you have access to all the fields and objects (Give permission set)

Ensure that you have disabled Send SMS from admin portal

none

7

Create conversations on SMS History

If you want the old messages to be available in conversations

If there are active process flow, workflow or triggers which run on update of SMSMagic__c or Conversation__c object

Before you run the batch, ensure that there is no active process flow, workflow or trigger running on update of SMS history and Conversation__c object.

Ensure you are the admin

Ensure that you have access to all the fields and objects (Give permission set)

Ensure that you have disabled Send SMS from admin portal

none

8

Create conversations on Incoming SMS

if you have incoming messages in Incoming_SMS__c object and you want the old messages to be available in conversations

If there are active process flow, workflow or triggers which run on update of Incoming_SMS__c or Conversation__c object

Before you run the batch, ensure that there is no active process flow, workflow or trigger running on update of Incoming_SMS__c and Conversation__c object

Ensure you are the admin

Ensure that you have access to all the fields and objects (Give permission set)

Ensure that you have disabled Send SMS from admin portal

none

9

Migrate incoming to common object

If you want to use a common object to store both inbound and outbound messages

If you don’t have custom code, process builders, workflows, reports, buttons or configuration on the Incoming_SMS__c object.

Ensure that there is no email notification etc on new incoming messages

You have no dependency on Incoming_SMS__c object and all custom functionality has been ported to SMS History object.

Before you run the batch, ensure that there is no active process flow, workflow or trigger running on update of SMS history and Conversation__c object.

Ensure you are the admin

Ensure that you have access to all the fields and objects (Give permission set)

Ensure that you have disabled Send SMS from admin portal

none



Data Migration Known Issues

Failed Transactions owing to missing permissions

Scenario

User tries to perform migration but the transaction fails.

Possible Causes

The user may not have been assigned the relevant permissions.

Issue Resolution

Provide user with complete access to the SMS-Magic Objects(Conversation, Incoming SMS, SMS History) so as to prevent transactions from failing.


Data Issues

Scenario

Post migration, user notices that all messages have not been migrated.

Possible Causes

The sender Ids and mobile phone numbers on records from which messages were sent and received, may have been changed.

Issue Resolution

Once migration is completed, verify all sender IDs and update them manually if required.