1

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.



Field Indexing

Overview

The default duration defined for the “last sender” functionality (i.e. available for SMS Magic Interact ver. 1.48 and below) is 7 days. In other words, it checks the SMS History records for the past 7 days and if the phone number matches with the incoming SMS record, then, pulls in the SMS History owner.

We can increase the cut-off date from 7 to 30 using the following procedure to Index Fields:

  1. Under Salesforce Setup, click Custom Settings.
  2. Under Duration To View History For Incoming click Manage and then click New.
  3. Type a new name and extend the value for the field noOfDaysForCutOffDate to 30.

However, if the customer sends out a lot of text (more than 10,000), then, the query which we run to check the SMS history record will not work correctly.

In such cases, we need to raise a request with SF Support Team to get the field indexed along with the relevant Query.

  1. Ask the customer to provide subscribers access to Salesforce support.
  2. Get the org ID.
  3. Go to partners.salesforce.com to create a partner case.
  4. Log in using CS LMA login.
  5. Under the Support Section, create a New Case.
  6. Select the category as Salesforce Functionality.
  7. Create a Case.
  8. Add the severity level.
  9. Provide the following details:
    • ORG ID
    • Indicate if the access is provided
    • The need for this functionality.
  10. Provide the Query and field to be indexed based on the SMS-Magic Package version the customer is using (Refer to the section on Queries to view the fields to be indexed based on the package version).
  11. Also add the binding Values (ie. variables which are used after the Where clause of the query) for the query in the ticket.
  12. Provide the following details on the case:
    • What percentage (%) of your users are affected?
      — Add the percentage (%) of users for the Account who are using the app.
    • Does this affect data integrity?
      — Yes. Incoming messages are not associated with Outgoing messages.
    • Do you have a viable workaround?
      — No.
    • Does this affect critical application functionality?
      — Yes. We wish to index phone and sender id field of our custom object. When the customer receives SMS, we will query this custom object and if the records are huge (more than 10,000) then the query will timeout and the incoming SMS will not get attached to outgoing SMS which will impact our business.
    • What business functionality are you unable to perform?
      — To Receive incoming SMS and notify the correct user



Queries to Index Fields

Package Version 1.56 and later
Query 1
select id from smagicinteract__smsMagic__c where (smagicinteract__Unformatted_Phone_Number__c in :phoneValues or smagicinteract__PhoneNumber__c in :phoneValues) and smagicinteract__senderid__c = :inboundNumber limit 1
Query 2
select id from smagicinteract__Conversation__c  where smagicinteract__Sender__r.smagicinteract__senderId__c in :senderIDSet and smagicinteract__Mobile_Number__c  = :mobileSet and smagicinteract__State__c = \’Open\’ and ownerID = :userID order by createddate desc
Fields
•smagicinteract__Unformatted_Phone_Number__c•smagicinteract__PhoneNumber__c of smagicinteract__smsMagic__c•smagicinteract__Mobile_Number__c of smagicinteract__Conversation__c
select id from smagicinteract__smsMagic__c where smagicinteract__Direction__c = :directionValue and (smagicinteract__Lead__c = null OR smagicinteract__lead__r.isconverted = false) and (smagicinteract__Unformatted_Phone_Number__c in :phoneValues or smagicinteract__PhoneNumber__c in :phoneValues)  and smagicinteract__senderid__c in :outgoingSenderIds order by smagicinteract__CreatedOn__c desc NULLS LAST limit 1

Package Version 1.52 -55
Query
select id from smagicinteract__smsMagic__c where (smagicinteract__Unformatted_Phone_Number__c in :phoneValues or smagicinteract__PhoneNumber__c in :phoneValues) and smagicinteract__senderid__c = :inboundNumber limit 1
Fields
•smagicinteract__Unformatted_Phone_Number__c•smagicinteract__PhoneNumber__c of smagicinteract__smsMagic__c
select smagicinteract__account__r.sms_us_homephone__c,smagicinteract__account__r.sms_us_phone__c,smagicinteract__contact__r.sms_us_phone__c,smagicinteract__lead__r.sms_us_phone__c,smagicinteract__opportunity__r.account.home_phone__c,smagicinteract__opportunity__r.account.phone,smagicinteract__opportunity__r.account.sms_us_homephone__c,smagicinteract__opportunity__r.account.sms_us_phone__c,zinvoice__r.sms_phone__c,smagicinteract__account__c,smagicinteract__contact__c,smagicinteract__lead__c,smagicinteract__opportunity__c,zinvoice__c,Id,smagicinteract__lead__r.isconverted,smagicinteract__senderid__c,smagicinteract__phonenumber__c,smagicinteract__unformatted_phone_number__c,smagicinteract__Converse_App__c,smagicinteract__Converse_App_Action__c,smagicinteract__Converse_App_Task__c,smagicinteract__Conversation__c,smagicinteract__ObjectType__c from smagicinteract__smsMagic__c where smagicinteract__Direction__c = :directionValue and (smagicinteract__Lead__c = null OR smagicinteract__lead__r.isconverted = false) and (smagicinteract__Unformatted_Phone_Number__c in :phoneValues or smagicinteract__PhoneNumber__c in :phoneValues)  and smagicinteract__senderid__c in :outgoingSenderIds order by smagicinteract__CreatedOn__c desc NULLS LAST limit 1

Package Version 1.51
Query
select id from smagicinteract__smsMagic__c where (smagicinteract__Unformatted_Phone_Number__c in :phoneValues or smagicinteract__PhoneNumber__c in :phoneValues) and smagicinteract__senderid__c = :inboundNumber limit 1
Fields to Index
•smagicinteract__Unformatted_Phone_Number__c•smagicinteract__PhoneNumber__c of smagicinteract__smsMagic__c

Package Version 1.50
Query
select id from smagicinteract__smsMagic__c where (smagicinteract__Unformatted_Phone_Number__c in :phoneValues or smagicinteract__PhoneNumber__c in :phoneValues) and smagicinteract__senderid__c = :inboundNumber limit 1select id from smagicinteract__Conversation__c  where smagicinteract__Sender__r.smagicinteract__senderId__c in :senderIDSet and smagicinteract__Mobile_Number__c  = :mobileSet and smagicinteract__State__c = \’Open\’ and ownerID = :userID order by createddate desc
Fields to Index
•smagicinteract__Unformatted_Phone_Number__c•smagicinteract__PhoneNumber__c of smagicinteract__smsMagic__c•smagicinteract__Mobile_Number__c of smagicinteract__Conversation__c

Package Version 1.48 or earlier
Query
select id from smagicinteract__smsMagic__c wheresmagicinteract__PhoneNumber__c in :MobNum1 order by createdDate desc limit 1
Fields to Index
smagicinteract__PhoneNumber__c of smagicinteract__smsMagic__c



Invalid API Key

Scenario

The user gets the Invalid API Key error while registering SMS-Magic Converse on Salesforce.

Possible Causes

  • You are trying to register the application on a refreshed sandbox while the username is still registered on the portal with another Org ID (that existed before the org was refreshed).
  • Portal team has 2 different API keys stored in the database for the account.

Issue Resolution

Follow the given procedure to resolve the Issue:

Ensure you have Subscriber Access prior to performing these steps.
  1. Log in to the User’s org.
  2. On the Setup page and search for Custom Settings.
  3. On the Custom Settings page, click SMS-Magic URL Setting.
  4. Click Manage.
  5. Delete the record. This enables the registration steps to be re-activated.
  6. Consult the portal team to remove the user/or change the old Org ID in their database.
  7. Revert to Salesforce and try to complete the registration steps again.
  8. If the issue remains unresolved, reach out to the Dev team;
    Or
  9. Reach out to the portal team, to store the correct API key and try registering the application again.



Text Fields Unavailable for Phone Field Selection

Scenario

While creating and configuring MOC objects, users are unable to locate text type fields to attach to their Phone fields in the field type drop-down.


Possible Causes

The unavailability of text fields for phone Field selection during MOC configuration is not a bug but a conscious feature enhancement to optimize queries.

While performing an Incoming lookup on a phone field, we perform two activities. We do a query (SOQL) and a search (SOSL). A query will always require an exact match of the information as it cannot handle multiple formats. However, If the field type is phone we are assured of a result when we do a search. The SOSL will check for multiple things and will retrieve a result if the exact same digits are used in the search text. For example, we need to search for a number (321)7863456 and type 3217863456 in the phone field. While doing an SOQL we will not get any results as it does not match the format.
However, results are retrieved while performing an SOSL search, as the search text though unformatted (missing the brackets or other special characters), contains the exact same set of digits as our required number. This is possible only because the search was run on a phone type field.

Conversely, if we use text type fields for InPhone MOC objects, instead of phone type fields, then, it affects the queries that we use for lookup resulting in the incoming SMS not being attached properly. For a text field, numbers stored as +1 432 432 9982 or 14324329982 or 1 43 24 32 99 82 all represent different values irrespective of whether they display matching digits or formats. Therefore, running a query or a search on these will not retrieve any results.


Issue Resolution

Though not recommended we do provide a workaround for customers who wish to use the text type fields despite its limitations.

Ensure that you educate the customer on the reasons for our implementation. Also prior to continuing with the workaround, inform the customer that we cannot guarantee the lookup fields to be populated correctly as it will be heavily dependent on the format in which the number is stored.

Follow the given procedure to use a text field:

  1. Under All tabs click the message configuration object.
  2. If you cannot view any tab, follow the given procedure to create a new tab:

    1. Under Setup, click Create and then click Tabs.
    2. Click New next to Custom Object Tabs.
    3. Select Message Configuration Object.
    4. Select a tab style and click Next.
    5. Select the appropriate details as required.
    6. Click Save.
  3. Click the record (Object name) for which you would like to add a text field as a phone value.
  4. Click New Object Field Config button for Object Message Config.
  5. Type a name for the Object Field Config.
  6. Define Outgoing as the Field Purpose.
  7. Define API Name as the field type.
  8. Add the API name of the text field, that you would like to use in the Field Name field.
  9. Click Save.



Sending Automated Messages for Customer Community Users

Scenario

In SMS Magic Converse (version 1.51 and later), every user needs to have an SMS Magic user license in order to send messages from the Salesforce Org.
When a record is created on the SMS history object, a check is first run to see if the SMS-Magic user license exists with the Created by user. If the license does not exist, a second check is run to see if the SMS history record owner possesses the SMS-Magic user license. If none of the record owners possess the license, an error message is displayed indicating that a license needs to be assigned to the user.


Who is a Guest User?

A guest user profile is designed to control public (unauthenticated) access to data, content, and objects in your community that doesn’t require authentication. Guest users have access to the public pages in your communities and portals. However, to allow guest users to view or submit data to a standard or custom object, modify the object’s permission in the community’s guest user profile.


Possible Causes

Guest users use a different portal to update the data in Salesforce. Any automation running on that data defines the guest user as both the Created by and owner of the SMS History record. However, as the guest user does not have an SMS-Magic License, the message fails to go out.


Issue Resolution

Step 1 – Share the Salesforce user record with guest users with the help of Criteria based Sharing rule on the User object.

  1. Under Setup, click Sharing Setting.
  2. Select the Object User and then click New under User Sharing Rule.
  3. Enter the following details:
    1. Rule Name: Enter the name to the sharing rule
    2. Select your rule type: Select Based on criteria as the rule type
    3. Select the details of the user(s) you wish to share in the criteria:
    • First Name: First name of SMS-magic user licenses (Salesforce license User); and
    • Last name: Last name of SMS-magic user licenses (Salesforce license User)
  4. Select the user(s) you wish to share the license with: Share it with the group of Guest user license (Group Name – All Community Portal users)
  5. Select the level of access for the users: Read Only
  6. Click Save

Step 2– Once the sharing rule is created, open the Flows and update the following details:

  1. In the Flows Action, create a record on the SMS history object.
  2. In the Owner ID is equal to User field, select the name of the SMS-Magic user license which was shared with guest user licenses in the Sharing rule.
  3. If the client is using the Converse App task, then instead of creating an action in the Flows, create an SMS history record.
  4. In the automation, update the Owner ID field value with the Name of the SMS- Magic user license which was shared with guest user licenses in the Sharing rule.
  5. When the Guest user updates the record in Salesforce, the Flows is called.
  6. It updates the ownership of the SMS history record to the user who has an SMS-Magic user license and sends out the message successfully.

Step 3 –

If you are using 1.68 or above versions, assign an org-wide license to your org. With this, you do not need to individually assign licenses to external users.




Server Migration – Moving from US to EU Servers

Prior to beginning the migration process, you need to request the customer to provide you with his/her subscriber access.
  1. On the Customer’s Salesforce Org, under Setup click Custom settings.
  2. Click SMS-Magic Security Setting.

    sms_magicecuritysetting
  3. Click Delete.
  4. Under Custom Setting, click SMS-Magic URL Setting.

    sms_url
  5. Click Delete to remove all prior Server configurations.
  6. Click Save.
  7. Under Converse Settings, to register your application, select EU from the Server Location drop down.
  8. You can also update the SMS-Magic Remote site settings with the following URL https://eu.sms-magic.com in Remote Sites Settings page under Setup.

    Do not connect to OAuth once registration is complete. Customer needs to visit https://eu.app.sms-magic.com and sign in with their Salesforce ID to connect to OAuth.
  9. Send an SMS from salesforce to check if Delivery status and incoming SMS are working as expected.
  10. Check the logs from the admin portal using the following credentials
    URL:- https://eu.ops.sms-magic.com/
  11. Update the incoming URLs of the existing incoming number from the provider’s portal.
  12. On the Nexmo portal update the following URL on the incoming number – https://eu.sms-magic.com/incoming/storeincoming/nexmo