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.



Incoming Refresh

Overview

The Converse Desk enables us to view conversations under multiple filters. While on one filter, we may wish to be notified of new incoming messages without having to move from our current location.

If an infinite-scroll is present, we may be forced to move to the top of the page compelling us to forgo our current activity on a conversation.

The Incoming refresh functionality, therefore, simply increments the number next to the Inbox and Object icons in the Converse Desk as an indication that new messages are available. If you click on it, it will take you to the first page and all the conversations are displayed there.

If you are however on the first page, it refreshes the page with the new message. A new record is appended at the top of the page.

Error Scenarios

Incoming Refresh may fail to function owing to the following error scenarios:

Notifications disabled

You need to enable notifications to view intimations of incoming messages. Unblock all browser notification functionalities to view the notification.

Comet Resource Fails to Load

Comet Resource are Java Scripts provided by Salesforce. We copy this and create it as a static resource in our package. If this resource fails to load, then incoming refresh will never work as expected.

Comet Resource is used for Streaming API which enables the User Interface to know that a record was created or updated in the backend.

While a Push topic helps you configure what you want to listen to, the Comet helps you in capturing that information and make it available. So, in this scenario there could be two things that could have gone wrong.

•Either the Push topic was not configured properly
OR

•the Comet Resource failed to load  

Do the following to detect the Comet Resources failure to load:

1.Right-click the page and click Inspect.

2.Under Console note the error messages (highlighted in Red) indicating the failure of the Comet Resources to load.

To resolve the error you can reload the page to see if the resource loads properly. If there are no errors, you should be able to view notifications.

CORS Issue – Salesforce Workaround

If errors persist, the issue could be due to a CORS problem. This is a Salesforce internal problem. We have received a workaround from Salesforce for this. This workaround is available from version 1.54-55. We have implemented that change from version 1.56. Users of 1.56 or later should not be facing this issue.

Customer needs to be taken to the said version to resolve this issue or a patch needs to be created.




Incoming Not Loading

Scenario

Unable to see incoming messages.

Possible Causes

This occurs when data is present in the two object mode and you have set the single object mode. In this scenario, it is unable to identify incoming messages.

Issue Resolution

Follow the given procedure to resolve the issues:

  1. Under Global Settings, check to see if Use Single Message Object is enabled.
  2. If yes, then check for messages with the direction IN.
  3. Look for conversations within these incoming messages.
  4. The possible scenarios may occur:
    • You do not find any relevant conversations for the incoming messages. This indicates a genuine problem.
    • You find relevant conversations. It indicates that all these conversations failed to get transferred during migration.



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.



Global Components

A global component is a reusable component that has the capability to be called from outside the SMS-Magic Converse package. Global Components are indicated by the attribute access= “Global” within its code.

The Converse Desk utilizes three main Global components. These include the following:

The Composer component – This appears below the message flow interface and is used to compose the message, attach sender ID and templates, append the Recipient address and perform other activities like attach emojis, include Internal notes and check the character limit. The Composer component cannot be used independently and will always be used along with the message flow and conversation flow.

The Conversation Component – This comprises the Message flow interface. It provides a phone-like look and feel and comprises a dump of all the messages without any grouping or categorization.

The ConversationView Component – This component displays all the conversations that have happened for an object. It groups all conversations by the object type and displays details including the intended recipient, time, message direction (incoming or outgoing) conversation topic and the message extract.

  • Global Components enable you to display Converse Desk on the tab view.
  • In order to display an embedded view of conversations from a page, the conversation components need to be defined as Global.



  • Unable to send messages using Conversation View/Converse Desk/Converse Inbox

    Scenario

    A user tries to send messages using Conversation View/Converse desk/ECD but is unable to do so.


    Possible Causes

    The following reasons may be responsible for this issue:

    • The user has not been assigned an SMS-Magic License.
    • The user does not have permissions granted for SMS-Magic object through the permission sets or from the profile level.
    • The user does not have read access to the name field, mobile field or SMS Opt-Out/SMS Opt-In field referenced in the MOC.
    • SMS Credits are exhausted.
    • Mobile fields used in MOC is empty.
    • SMS History record is created but SMS is not delivered (due to an issue on the providers end).
    • A custom automation rule is causing an error with SMS History record creation

    Issue Resolution

    Make sure that the user has a license assigned to him/her as well as he/she has appropriate permissions assigned.

    You can check the following link to review the minimum access level – https://www.sms-magic.com/technical-resource-center/sms-magic-guide-for-salesforce-admin/sms-magic-converse-guide-for-salesforce-admin/

    Navigation: Table of Contents > SMS-Magic Converse Permission Details.

    The process builder/workflow/flow/trigger from the customer’s org may be incorrectly configured on the SMS History object. Due to this, the SMS History record is not getting created.

    Review the configurations and modify it so that the SMS History record is created correctly. Even after reviewing and consulting with the CS team, if you are not able to find a solution, then, you can reach out to the Dev team.




    Conversation Object Structure

    The Conversation object is the primary object that stores all information for the SMS History object as well as for the Incoming SMS History object (If you do not use Single-object structure). You need to focus on the following fields:

    You will require a Subscriber Access to Customer’s Org to access the Setup pages.
    Field Description
    IsUnread This indicates that the conversation is not read and is available under the Unread Filter.The Unread state would be based on whether it is an Incoming or Outgoing messages.•Outgoing Messages – The IsUnread flag is set to False.•Incoming Messages – The IsUnread flag is set to True.When a message is opened, the IsUnread field is cleared. Every time a new message comes in, a value is set and updated. The IsUnread Flag is set to true again and the New Count field (described below) is incremented by 1.
    During Data Migration all incoming message are set to New by default. You will have to check and update all conversations that you have previously worked on.
    Field Description
    LastIncomingTime Displays the time when the last message was received on this conversation
    LastMessageDirection Indicates the direction of the last Message received (Incoming/Outgoing)
    LastMessageTime Indicates the time the last message was received.
    New Count Indicates the number of new messages
    Object Indicates the name of the Primary Object that initiated the conversation. This is one of the MOC objects identified.
    Mobile Number This displays the Conversation Recipient Map.
    Sender This displays the Conversation Sender Map and comprises the Sender ID Lookup.



    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



    Converse Inbox

    The Converse Inbox is:

    •A minimized version of the Converse Desk.

    •It enables user to respond to new or unread messages, opportunities from leads or prospects with ease, without disrupting their workflow.

    •It can be accessed from object pages, sales and service consoles as well as from the Salesforce Mobile App.

    •It provides similar feature benefits like the Converse Desk.

    You can use the following code snippet to integrate the Embedded Desk in Visualforce pages for Classic versions:

    For Lightning Interfaces, it will be a GUI based functionality. You will be allowed to make necessary changes by selecting the following values:

    • Embed Context = Activity/Detail
    • UI Context = Lightning
    <apex:page showHeader="false" standardController="Lead">

        <apex:includeLightning rendered="true"/>
        <div id="lightning" />

        <script>
            var recordId = "{!$CurrentPage.parameters.id}";
            $Lightning.use(
                "smagicinteract:conversationApp", 
                function() {
                    $Lightning.createComponent(
                        "smagicinteract:conversationView",
                        {
                             recordId : recordId,
                             embedContext : "detail",
                             uiContext : "classic"
                        },
                        "lightning",
                        function(cmp) {
                        }

    Check and modify the following attributes in the code:

    Attribute Name Description
    standardController Type the Object name in which you wish to embed the Desk.
    For example, Contact.
    embedContext This should display Detail.
    UI Context This should display Classic.



    Lookup not functioning as expected

    Scenario

    Incoming SMS does not look up to the right record in versions 1.50 and above.

    Possible Causes

    When an incoming SMS is not getting attached/related to/looked up to the correct records, for example – Lead, Contact or any other custom or standard object, then, it can be due to the following reasons –

    • The MOC is not created properly. The phone field used is not storing the mobile number
    • The field used in the MOC is not valid or does not exist
    • You have used a text field or a formula field for the phone value in the MOC and due to this our query doesn’t work correctly. Please make sure that you use a phone type field in the MOC.
    • The OAuth user does not have access to the SMS-Magic Objects. OAuth user needs to have proper access to SMS Magic Components. You can either assign our permission set and grant additional access through profile or directly check and grant access to all components through the profile level.
    • The OAuth user does not have access to the record on which the mobile number is stored.
    • The mobile phone contains a prefix such as 00 or 07 and thus causes issues with the lookup since the incoming number does not have this prefix.
    • There are multiple occurrences of the mobile number on various records.
    • Portal lookup flag is enabled. This flag was used in older versions where customer stored numbers in multiple formats.

    Field Does not Exist and Incorrect Lookup has similar possible causes as mentioned above.




    Configure CRM Actions

    CRM actions are taken on objects (both standard and Custom) to help user achieve their CRM objectives.

    User should be provided with the custom permission “AllowToTakeActionOnConversation” in order to perform (access) any CRM Action.

    CRM Actions can be configured in two ways:

    • From Custom Object Builder
    • From Converse Settings interface
    Refer to the SMS-Magic Guide for Salesforce Admin for details on configuring the CRM Actions from Converse Settings.

    Configure CRM Actions from Custom Object Builder

    CRM Actions can be configured under three objects. The table given below highlights the three objects and the relevant fields you need to customize:

    Action
    Stores all the actions from which the user chooses
    Attributes Description
    Action Name Type the name of the action to be performed. For example, Create a lead.
    Action To Perform Add the action to be performed. For example, create a record.
    This is Picklist data type.
    Action Type Select the type of action to be performed. For example, Manual.
    Description Type a brief description on the objective achieved by the action.For example, this action will create a new record.
    Action Parameter
    Define the parameters that helps user perform the actions
    Attributes Description
    Action Parameter Name Type a name for the Action parameter.
    Parameter Type Enter the parameter type. For example, Field, URL
    Parameter Name Type the name of the parameter. For example, ObjectName.
    Action Select the action that you have created under Actions setup page.
    Parameter Value Type the value of the parameter. For example, Field name or value.
    Object Type the name of the object from which the field value is retrieved.
    This is required only if you have selected the parameter value as field.
    Action ObjectStores the mapping of the object and its associated actions.
    Attributes Description
    Action Object Name Type a name for the Action object (User-defined)
    Action Select the action you have created in the setup pages



    Incoming Does not Sync

    Scenario

    Incoming SMS are not being pushed to Salesforce.

    Possible Causes

    Following are the reasons due to which incoming SMS are not being pushed to Salesforce –

    • The Push to SF flag is not marked as true for the inbound number
    • The OAuth or Web Service is not enabled for the Account
    • The OAuth user or Web Service user is set for the Account, does not have the necessary access to SMS-Magic Objects on Salesforce.
    • There are automation rules set on the Object where Incoming SMS records are stored. These automation rules are not configured correctly due to which it fails and rolls back the process of pushing the incoming SMS from Portal to Salesforce.
    • The OAuth user is Inactive.



    Related Conversation

    Every conversation involves two lookups. One is of a primary object and the other is of a related objects which the primary object will use as a lookup. Related objects are objects that the primary object references at various stages of the CRM lifecycle. A detailed conversation trail displays all messages that are sent to the primary object. It also includes all those that have been sent to or received from the associated or related objects in relation to the primary object. All such conversation threads are known as Related Conversations.

    In order to view, related conversations, we can map the primary MOC and the lookup fields that will populate the conversation.

    Configure The Mapping for Related Conversation

    New Conversation Related Object
    Attributes Description
    MOC Select the Primary object. The conversation will center around this object.
    Conversation Field Type the Lookup field for the object that will be used to populate the conversation.
    Absolute Field Provide the object hierarchies to define the parent-child relationships.



    Record Owner Notification is not working

    Scenario

    Notification is not sent to Record owner when an Incoming SMS is received.

    Possible Causes

    •Incoming SMS owner is not assigned as the OAuth user (the user with whose access the incoming SMS is being pushed to the CRM)

    •The related Contact/Lead/or any other record does not have the mobile number stored in recognized formats – (xxx) xxx-xxxx or 1xxxxxxxxxx (where “1” is the country code)

    •The related record owner does not have access to the fields of incoming SMS object.

    Issue Resolution

    If the owner of the incoming SMS is added correctly and even then the owner does not receive a notification, check to ensure that the email notification is not being caught in the spam filters of the user’s Inbox.




    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, 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



    Storing Data

    Once you complete the SMS-Magic Converse Setup, the data gets stored in the following locations:

    You will require Subscriber Access to Customer’s Org to access the Setup pages.

    Registration and Remote SettingsSMS Magic URL Setting

    Remote URL: Stores the Server Location defined in the Registration and Remote Site Settings Page.

    Server location needs to be modified during migration from US server to EU server. For more details, refer to Server Location Moving from US to EU under the Known Issues section.
    SMS Magic Security Setting
    API Key Stores API key generated once the registration is completed
    Application Key Stores the key that is generated once the registration is completed
    IsRegistered This should be enabled for all completed registrations.

    Compliance – Global Settings

    Compliance Type: Stores the type of compliance that has been configured in SMS-Magic Converse Settings. This value can be cleared to help users reset their compliance.

    If Compliance type is changed, it is recommended to change the Message Objects (MOC) that have been configured as well.
    It is also recommended that you check the impact on all Visualforce pages generated as part of the MOC and change them as required

    User Management

    Once you register, an OAuth user is created. Subsequently, all information entered in the Portal billing account will be automatically synced with Salesforce. For example, if 5 licenses are added in the Billing account, the same number should be displayed in the User Management interface under Available licenses.

    Setup Page Data Stored in Page
    License Management Edit
    Name Stores the License Name being displayed to users.
    Standard Stores the number of available licenses being displayed to users.
    Currently Standard type License is the only available type.
    The number of licenses displayed here will be the same as the one shown on the User Management UI.
    The number of licenses entered in the User Management UI should be the same as the one available in the Portal.
    Any discrepancy in number of available licenses in the two interfaces may lead to issues at the time of billing.

    License Object: The license object has a user lookup which points to a user field. If this user record field is active only then will the User Management interface display the relevant users. Therefore, the User Management page in the UI displays data that corresponds only to active users with a license. If you are unable to view the correct number of user records, check to see if all users are active.

    Status: Stores all user records that are being included in the User Management section.

    Message Object Configuration
    Unrelated Object Config
    Standard Fields/ Custom Fields and Relationships Stores all details of Information Objects configured in MOC.
    Sender ID & Assignment
    SMS Sender ID
    Custom Fields Stores all information on Sender ID
    Sender ID Profile Map
    Custom Fields and Relationship Stores all information on the default Sender ID and the user/Profiles they have been assigned to.
    Permission Management
    Global Settings
    Use Single Message Object This is configured from the backend. It helps you define where you wish to push the information to. So, if you select SMS History once, it indicates that you wish to store both incoming and outgoing in the same object.This should be done only once the OAuth has been set up successfully or else the data will not be synced to Salesforce.Check to ensure that this field is selected. If it is not selected then Converse Settings will display only partial data.
    If Converse Flow does not display incoming messages, a possible reason may be that the Use Single Message Object checkbox is not selected indicating that SMS History does not act as the single object where all incoming messages will be stored along with outgoing.
    Enable Incoming Notification This field should be enabled in order to receive notifications for Incoming message
    Can Setup App This field needs to be selected in order to allow user to work on Converse App
    Default Email Notification Template Stores the Template ID of the Email Template.
    Task subject Stores the Subject of the workflow task that will trigger the action.
    Max SMS Text length Stores the character limit for sending SMS.
    Allow to send message as Record Owner Enables record owner’s Sender ID to be used for sending messages.The record owner indicates the owner of the primary object of the conversation. For example, if primary object of the conversation is a contact, then it would be the owner of that contact owner.Select this value to make it available in the Sender ID drop-down list in the Conversation Composer in Converse Desk.When we select this value, we are selecting the criteria for sending out the message. Once selected, the following checks are performed:a.The owner of this record is checkedb.The default sender value of that person is checked.If there are no matching values for either of the checks then the message fails.
    Check Readiness
    If you have created a picklist field with 3-4 values, during upgrade you may wish to add few more values to the field. However, Salesforce does not permit an automatic upgrade of the values. Therefore, this tab is provided to help you manually select the picklist value that you wish to add during version upgrades.