SMS Post Installation Guide
Login to your Salesforce org where the package is installed.
Note:
1. We will be creating a Public site to receive all the web hooks for an Incoming SMS. Since it will be an external User, Please make sure that the external profiles does not have access to any Object or Field permissions.
2. If you create any new field, please give access to that field for required profile
Click on the Gear icon and Go to Setup.
Search for Custom Setting in Quick Find Box.
Click on Manage of “SMS Credentials”.
Enter the details as shown in below picture.
Search for Custom Setting in Quick Find Box.
Click on Manage of “Data Transfer Settings”.
Click on Edit of “InboundSMS_Query_Label”.
Enter the details as shown in below picture.
In value section, Enter following query :-
FIND {0} IN ALL FIELDS RETURNING Contact(Name, Id ORDER BY LASTMODIFIEDDATE DESC LIMIT 1) LIMIT 10
(Change Object Name in Query as per requirement)
Now, Go to Custom Settings and Click on Manage of “Features Entitlement“.
Mark the checkbox true for SMS and eFax.
Go to Object Manager and Go to the source object.
Click on Page Layouts
Add SMS Messages into Related List
SMS Number - User Mappings:
Go to SMS and eFax App from App Launcher
Go to SMS Number - User Mappings tab and click on New.
For SMS Registered #, Click on New SMS Registered #,
Enter the number and Save.
Map the user and Click on Save.
Update SMS Templates:
Go to SMS and eFAX Application.
Go to SMS Templates tab.
Click on New
Click Next and Update the SMS/Email/Message Fields According to Business requirements.
Update the fields according to the business requirements.
Now, Go to Setup and search “Custom Metadata Types” in Quick Find Box.
Click on “Manage Records“ of SMS Configuration.
Click New.
Enter the details as shown below:
For Label, Enter Object name
For UI DropDown Options, Enter the required Phone field. In above picture, the required field is Phone only , if the requirement is of more than one field, write as comma separated value. (Example :- Phone,MobilePhone).
For Type, Select SMS
For SMS Opt Out, Enter the API name of SMS Opt out field
(Note : If Source Object is other than Contact, Please create SMS Opt Out field)
Creating Salesforce Site:
Click on the gear icon and go to setup.
In the quick find box search for sites.
Click New
Provide the required information(Label, Name, etc.) as shown in below picture.
Click Save.
Apex Class Assignment to Site Guest User:
In Global search, Search for Site Guest User.
Click on the site name which we have created just now.
Click on the profile.
Click on Enabled Apex class Access.
Provide Access to below classes.
cm_datatransfer.InBoundMessageParser
cm_datatransfer.InboundMessageWebhook
cm_datatransfer.SMSMessageTriggerHandler
cm_datatransfer.SMSMessageUtility
cm_datatransfer.SMSMessageWrapper
SMS Inbox:
For SMS Inbox functionality, follow the below steps :
Go to SMS Message object
Click on Fields and Relationships
Search for SObject Name field
(Note : If Source object is other Contact, Please create SObjectName field using the below formula
IF(Lead__c <> NULL, Lead__r.FirstName + ' ' + Lead__r.LastName, Name)
Please change the Source Object Name accordingly)
Go to Custom Settings
Click Manage of Data Transfer Settings
Create new entry named SObjectNameInbox. (If you don’t find entry for SObjectNameInbox)
For Value, Enter the API name of SObject Name field
Click Save
Remote Site Settings:
Note : Please check if there is site named SMSAPISite and it is Active, If not then perform following steps :
Enter Remote Site Settings in Quick Find Box.
Click on New Remote Site.
Enter the details as shown in below picture.
Click Save.
Congratulations! You have successfully installed the Application.