360 SMS
Configuration & User Guide
1
Contents Sections are Hyperlinked for easy navigation
Disclaimer ..................................................................................................................................................................... 3
Introduction .................................................................................................................................................................. 4
Installation .................................................................................................................................................................... 5
Software/Hardware Requirements .......................................................................................................................... 5
Installation to your Salesforce Org ........................................................................................................................... 5
Basic & Trial Configuration ........................................................................................................................................... 6
Verify Installation ...................................................................................................................................................... 6
Initialize the App with a Phone Number and SMS Credits ....................................................................................... 7
Configure Page Layouts ............................................................................................................................................ 8
Add Buttons and Related Lists .............................................................................................................................. 8
Conversation View Configuration ....................................................................................................................... 10
Review/Edit designated Mobile Phone fields ......................................................................................................... 12
Batch SMS aka Bulk SMS ......................................................................................................................................... 13
List Views ............................................................................................................................................................ 13
Campaigns ........................................................................................................................................................... 14
How It Works .............................................................................................................................................................. 16
Advanced Configuration ............................................................................................................................................. 17
General Settings ...................................................................................................................................................... 18
Custom Object Configuration ................................................................................................................................. 21
Button Creation .................................................................................................................................................. 21
Field Creation ...................................................................................................................................................... 22
Conversation View Creation ............................................................................................................................... 23
Object Configuration ........................................................................................................................................... 24
Security & Licensing ................................................................................................................................................ 25
Licensing.............................................................................................................................................................. 25
SMS History Visibility Between Multiple Users .................................................................................................. 26
User Configuration .................................................................................................................................................. 27
User Configuration Options Explained................................................................................................................ 27
SMS Templates ....................................................................................................................................................... 28
Incoming Alerts ....................................................................................................................................................... 29
Classic Home Page component ........................................................................................................................... 29
Lightning Home Page Component ...................................................................................................................... 31
Lightning Utility Bar Component ........................................................................................................................ 32
2
Incoming Alert for Salesforce1 ........................................................................................................................... 33
Reply to Email Alert Configuration ......................................................................................................................... 34
Creating the 360 SMS Email Service ................................................................................................................... 35
Incoming Email Alert Email Templates ................................................................................................................... 37
Edit the Template ............................................................................................................................................... 37
MMS ........................................................................................................................................................................ 39
Hyperlink Clickthrough Tracking ............................................................................................................................. 41
Define a Clickthrough Email Alert ....................................................................................................................... 42
HTML for the SMS Clickthrough Alert ................................................................................................................. 43
Salesforce Sites ....................................................................................................................................................... 44
Create a Salesforce Site: ..................................................................................................................................... 44
Security for Salesforce Sites ................................................................................................................................ 46
Delivery Status ........................................................................................................................................................ 49
SMS from Salesforce Reports ................................................................................................................................. 50
Sending > 2,000 Records ..................................................................................................................................... 51
Send SMS with Process Builder .............................................................................................................................. 52
Method #1 Simple ............................................................................................................................................ 52
Relating Outbound SMS to Parent Object .......................................................................................................... 54
Method #2 Apex Class...................................................................................................................................... 55
Dynamically setting the Outbound Number ....................................................................................................... 57
Dynamic MMS such as sending a picture of a particular user ......................................................................... 58
Create a Master Send SMS Handler .................................................................................................................... 59
Drip Campaigns ................................................................................................................................................... 60
Using Salesforce Flows ........................................................................................................................................ 62
3
Disclaimer
This document contains Confidential, Proprietary and Trade Secret Information (“Confidential Information”) of
360 Degree Cloud and may not be copied, distributed, duplicated, or otherwise reproduced in any manner
without the prior written consent of 360 Degree Cloud.
While every attempt has been made to ensure that the information in this document is accurate and complete,
some typographical errors or technical inaccuracies may exist. 360 Degree Cloud does not accept responsibility for
any kind of loss resulting from the use of information contained in this document.
The information contained in this document is subject to change without notice.
The incorporation of the product attributes discussed in these materials into any release or upgrade of any 360
Degree Cloud software productas well as the timing of any such release or upgradeis at the sole discretion of
360 Degree Cloud.
4
Introduction
360 SMS is an easily implemented integration of inbound and outbound Text Messaging (SMS) capabilities within
Salesforce as well as MMS (sending pictures and files). The 360 SMS features at a high level are:
Individual one-on-one texting
Batch texting from List Views and Reports
Scheduled Texting
Triggered automatic texting via native Salesforce Process Builders
Surveys and Inbound Keyword processing to update Salesforce Fields or trigger additional messages
Templates
The solution is 100% native Salesforce, meaning that no data is stored outside of Salesforce. 3
rd
party messaging
services such as Twilio are invoked from the Salesforce environment but the messages (SMS) and/or attachments
(MMS) are never stored on other servers besides within the native Salesforce.
The solution installs just a few custom objects, buttons and Visual Force pages which the administrator adds to
the Page Layouts of key objects such as Contact and Lead.
When first installing the application either after purchase or as an evaluation, one or more phone numbers are
provided to facilitate the outbound and inbound text messaging.
When evaluating the solution, a free temporary phone number and free outbound SMS credits are issued for 7
days. From start to finish one can enable 360 SMS in Salesforce in just 2 minutes by pressing two buttons
(Outgoing Setup/Incoming Setup) to automatically issue the new phone number and credits and then adding the
Send SMS button and SMS History related list to your Contact or Lead page layout. That’s it! You should be
texting in less than 2 minutes. Optionally, you can drag the SMS Conversation View Visualforce page to your
Contact/Lead page layout to add even more value.
When purchasing, the customer may use their own phone numbers which are then “SMS Enabled” by us through
your provider. We take care of everything.
The following pages document the basic installation and configuration of 360 SMS followed by an Advanced
Configuration section which covers some of the more innovative features that differentiate 360 SMS from other
solutions.
5
Installation
Software/Hardware Requirements
360 SMS is a 100% Salesforce solution and thus requires no special hardware or other services to configure. It
works on the following versions of Salesforce:
Professional - although link clickthrough tracking is not available
Developer
Enterprise
Performance
Unlimited
The solution works in Salesforce Classic, Salesforce Lightning and Salesforce 1 automatically without any
additional configuration.
The solution will send and receive text messages and attachments (MMS) from any text enabled device using
industry standard SMS and MMS technology. Jump to the How It Works section for further explanations.
Installation to your Salesforce Org
You may install the 360 SMS solution to your Production or Sandbox from the Salesforce AppExchange. Simply
search “360 SMS” within the AppExchange and follow the simple instructions from there.
NOTE: As with most Salesforce Apps, we do recommend that when prompted, you choose the “Install for All
Users” option. The application is still controlled by Salesforce User Licensing and Permission Sets but choosing
the “Install for All Users” options just makes the security management a little easier down the road, either option
works fine though.
6
Basic & Trial Configuration
You can literally be sending and receiving your first SMS within 2 minutes using the following basic configuration
steps to:
1. Initialize the Phone Number and Credits
2. Add the Send SMS button to your page layout(s) and/or add the Conversation View to the page layout
Verify Installation
You can verify that the application has been installed correctly as there will be a new “360 SMS” app in your
applications list whether working from Classic or Lightning, Figure 1 .
Figure 1 - 360 SMS application from either Classic or Lightning
7
Initialize the App with a Phone Number and SMS Credits
To send your first message, you must first establish an Outbound/Inbound phone number. During a Trial
Evaluation a temporary number is automatically issued along with free outbound SMS credits. Purchasers of the
solution will have previously supplied their own phone numbers to be SMS Enabled or purchased new numbers.
You must initialize the app to push the Phone Number(s) into your Salesforce Org with two easy steps:
1. Navigate to the 360SMS App
2. Choose the SMS Setup tab
3. Press the Outgoing Setup followed by the Incoming Setup, Figure 2. This initializes the number to your
Salesforce org, no other input is required.
4. Developer Edition Note: Salesforce Developer Edition has special restrictions imposed by Salesforce and
thus requires an email to sales@360DegreeApps.com in order to establish the phone number and credits,
you’ll get an error shown in Figure 3 otherwise.
Figure 2 - Initialize the Phone Number and Credits
Figure 3 - Outgoing/Incoming Setup fails with Developer Edition - contact [email protected]
8
Configure Page Layouts
By default, the app comes completely configured for the Lead, Contact and Account objects. Refer to the Custom
Object Configuration section for additional standard and custom objects.
Add Buttons and Related Lists
Repeat these instructions for each standard object that you want to send/receive text messages from.
1. Edit the Page Layout
2. Add the Send SMS button(s)
a. 360 SMS works for Classic, Lightning and Salesforce1 the buttons/actions are slightly different for
Lightning and Salesforce1 and are dragged into their appropriate locations from the “Mobile &
Lightning Actions
b. Classic: Drag the button named tdc_tsw__Send_SMS to your custom buttons section
c. Note that you must make a request to Sales@360DegreeApps.com to enable the Send MMS
buttons shown in Figure 4, thus the Send MMS button may not be in your button list immediately.
d. Lightning: As shown in Figure 5, drag the Quick Action button named tdc_tsw__Send_SMS into
the “Salesforce Mobile and Lightning Experience Actions” section.
Figure 4 - Drag Send SMS buttons onto Classic, Lightning and Salesforce1 locations
9
Figure 5 - Lightning & Salesforce1 button configuration
3. Drag the SMS Opt Out field onto your page layout, this is optional. It controls the automatic Opt-Out
features of 360 SMS.
4. As shown in Figure 6, add the SMS History related list to your page layout (this is optional if you are
planning to use the Conversation View but still useful for other reasons). Modify the fields displayed as
you see fit. We recommend the fields shown below and setting the sort to Create Date Descending.
Figure 6 - SMS History related list
10
Conversation View Configuration
360 SMS comes with a pre-configured Conversation View Visualforce page for Contacts and Leads (jump to the
Custom Object Configuration section for additional standard objects and custom objects). The Conversation View
provides a nicer visual representation of the back and forth between the Salesforce user and customer. It is
essentially just a visual representation of the SMS History related list. See Figure 7.
To add the Conversation View to Contacts or Leads:
1. Add the SMS Conversation View Visualforce page to your page layout, Figure 8.
2. Add a new Section to your page layout and drag the SMS Conversation View Visualforce Page into that
section
3. Use the wrench icon to set the page height to at least 500 pixels.
4. That’s it, you’re ready to text!
Lightning Note: The Conversation View can also be dragged into any location on a Lightning Page Layout and
because it dynamically renders it displays nicely within Salesforce1 as well.
Figure 7 - 360 SMS Conversation View in this case capturing information via an automated survey
11
Figure 8 - Adding Conversation View to the page layout
Figure 9 - Add the Conversation View VF page anywhere you like in Lightning
12
Review/Edit designated Mobile Phone fields
1. As many organizations utilize different phone numbers for different purposes, 360 SMS is flexible to handle all
situations. By default, the application chooses all the standard phone fields for Contacts and Leads.
2. The Send SMS interface will change if multiple phone fields are defined versus if just one field is defined.
When multiple mobile phone fields are defined a pick list will be presented with a default field and the ability
to choose different fields to send the SMS to. Otherwise if only one field is defined no pick list appears, Figure
11.
3. To edit the defaults, simply delete the defined object definition and re-create it.
4. Obviously, only actual field(s) which hold mobile numbers should be defined, as sending to a land line will
function the same way as from your own mobile phone, it just will not get delivered.
Figure 10 - Define/Edit Phone Fields per Object
Figure 11 - Multiple Mobile Numbers defined (Contact) vs. only one field defined (Lead)
13
Batch SMS aka Bulk SMS
There are three ways to send Batch Text Message aka Bulk SMS, Batch SMS with 360 SMS. This also applies to
Batch MMS (sending of pictures):
1. List Views the Send SMS button is placed on List Views or Related Lists
2. SMS from Reports this is a unique feature only available from 360 SMS whereby you use standard
Salesforce Reports to execute the batch SMS. This is the most robust method as SF Reports allow cross
object queries and unlimited rows.
3. Campaign Add the Send SMS button to the Campaign Page Layout and all Campaign Members can be
sent a Template of your choosing.
NOTE: Regardless of which method used, records marked “SMS Opt-Out” are never sent via a Batch SMS even if
the criteria defined did not explicitly exclude them. The opt-out’s are simply skipped.
List Views
Figure 12 shows a typical List View (query) and the process of pressing the Send SMS or Send MMS button, then
choosing a template to send. Batch MMS works the same way, but offers the option to choose the files to send.
Note that when sending Batch MMS only one copy of the file is stored in the Salesforce DOCUMENT object and all
the outbound messages reference it, so as to save on storage.
Figure 12 - Batch SMS from List View
To configure Batch SMS for a List View or Related List simply add the Send SMS button to your standard Search
Layouts and/or Related Lists. Note that there are separate Send SMS buttons for Lightning so choose accordingly.
See Figure 13
14
Figure 13 - Add the batch SMS buttons to the object Search Layouts
Campaigns
360 SMS provides a Send SMS button for the Campaign object to facilitate batch texting the contacts and leads in
the Campaign Members object. As shown in Figure 14, you simply press the button and it prompts you for to
choose a template based on the Contact object and if the list also has Leads then it prompts for a lead-based
Template.
Figure 14 - Batch SMS from Campaigns - choose separate templates for Contacts vs. Leads
15
To configure simply add the Send SMS button to your Campaign page layout.
Note that the 2
nd
Send SMS button is for Salesforce1 and Lightning. It should be placed in its respective location in
the Salesforce Mobile and Lightning Experience Actions section. The screen capture shows the placement
of the button on the Classic Page Layout
Figure 15 - Add the Send SMS button to the Campaign to Batch SMS the Campaign Members
16
How It Works
Now that you have configured the basics, you can send an Outbound SMS either via the Send SMS button or via
the Conversation View. Either method writes a record to the SMS History related list for the object it was initiated
from. The outbound messages are designated with Type = Outgoing.
Inbound Messages automatically resolve to whatever objects are defined in the Object Setup (by default the app
is configured for Contacts and Leads). The inbound number will match to the designated fields defined in Object
Setup and create an SMS History record of Type = Incoming. It automatically handles various phone formats.
NOTE: Storing both the Outgoing and Incoming in a single SMS History object is an important differentiator for
360SMS as it makes reporting and automations significantly easier than with other SMS applications.
There are numerous settings which govern things such as SMS History.Owner (who gets notified when an
incoming message arrives) and an important setting which links the Incoming Message to its preceding Outbound
message. Review the General Settings section to see them all.
The linking of Incoming messages to their preceding Outgoing message is an important setting when working from
non-primary objects such as the Case object and Custom Objects, as the incoming message will automatically
resolve to the specific Case or Custom Object from which the outbound was sent. Additionally, this setting
controls the SMS_History.Owner so that the outbound owner will be notified when his/her message is answered
regardless of the parent object records ownership.
17
Advanced Configuration
This section covers the additional features and functionality that make 360 SMS unique among Salesforce SMS
Applications.
General Settings
Custom Object Configuration
Security & Licensing
User Configuration
SMS Templates
Incoming Alerts
Reply to Email Alert configuration
Incoming Alert Email Templates
MMS
Hyperlink Click Tracking
Salesforce Sites
Delivery Status
SMS from Salesforce Reports
Send SMS with Process Builders or Flows
18
General Settings
Owner Details
SMS App Owner Name:
Joe Administrator
The service user that all alerts and automated
processes will run under, i.e. the Created By User.
Defaults to the user that installed the app.
Subscription Keywords
Re-Subscribe Keywords:
Start,Subs
Automatic Opt-Out handling. Incoming SMS with these
keywords sets the Object.SMS_Opt_Out to False.
Unsubscribe Keywords:
Stop,Unsubscribe
Automatic Opt-Out handling. Incoming SMS with these
keywords sets the Object.SMS_Opt_Out to True. Note
that the STOP keyword unsubscribes the number at
the Provider Level as well regardless of the Saleforce
SMS_Opt_Out field value. The customer himself can
only re-enable themselves with the START keyword.
SMS Delivery Report Settings
Site URL:
http://boldercrm.f
orce.com/Incomin
gSMS
Although not required, Salesforce Sites technology is
used to update the SMS_History.DeliveryStatus and is
required for Link Clickthrough Tracking as well. See
documentation for Sites configuration.
SMS Delivery Report Settings
Set the default view:
My Conversation
Conversation View has the option to show
conversations between the Contact/Lead between All
salesforce users or only for the currently logged in
user (My Conversation). This option controls the
default behavior.
Settings for Incoming Alert SideBar
Default View:
Unread Messages
Controls whether all inbound messages are displayed
in the Side Panel Alert or just UnRead Messages.
Incoming Alert Color Changes to Yellow in:
60 mins
Controls the time duration at which the Inbound
message will change colors
Incoming Alert Color Changes to Red in:
120 mins
Controls the time duration at which the Inbound
message will change colors
Incoming Sidebar Automatic Refresh Time:
30 sec
Controls how often the Side Bar will poll and refresh
itself looking for new incoming messages or changing
colors of existing messages.
Enable Company Logo in Sidebar:
When enabled works in conjunction with the
"Selected Logo" option to allow one to use their
company logo in the Side Panel rather than the default
360SMS logo.
Selected Logo
SMS App Logo
Define the logo that will be used in the side panel.
Enable Audio on Incoming Message:
When enabled, plays a chime sound on the device
when an incoming message arrives.
Enable Sharing for Incoming Messages:
When enabled, allows the SideBar to show more than
just messages for the current user and instead utilizes
pre-defined Salesforce Sharing Rules setup for the
SMS History object.
Enable Reply Enable Read
Enable Unsubscribe
These options control the available buttons on the
side panel.
19
General Settings continued
Email To SMS
Email Service Address:
sms_incoming@r-
ojuzidkfmxk9w7ng4c48epx
csfd99ubw30a312go088t4f
85a.f4-
4iqrieao.na59.apex.salesfo
rce.com
When a Salesforce Email Service is configured this setting
allows the Incoming Alert Email Notification to be replied to,
which then sends the reply as an Outbound SMS to the
customer, negating the need to login to Salesforce to reply to
the customer. See documentation on setting up the email
service.
Enable Dark Hour
Enable Dark Hour for
Automation:
When enabled, no triggered or scheduled outbound
messages will go out during the time range. This is useful to
give the appearance that the triggered messages are being
sent from a real person rather than automation.
Starting Time:
10 PM
Start of the dark time period.
Ending Time:
6 AM
End of the dark time period.
Sending Time(Next Day):
8 AM
Sets the time at which all messages stopped during the dark
hours will then be sent on the following day.
Link Tracking
Link Tracking Status From
Backend:
Enabled
Hyperlink Click Tracking is enabled in the back-end by writing
to [email protected]m requesting it to be enabled. You
will then be sent instructions for the additional configuration
required. All clickthrough’s are tracked in native Salesforce
and thus reportable and triggerable.
Enable Link Tracking For
Bitly:
When enabled and when you have a Bit.Ly account, the
hyperlink sent in an outbound message will be automatically
transformed to a short bit.ly link on its way out. Thus, the
customer only sees the short link, but internally you see the
long link.
Bitly Generic Access Token:
********************
After setting up a Bit.Ly account, Bit.Ly supplies an API token
which we use to facilitate the back and forth translation of
the Bit.Ly link into friendly looking hyperlinks.
Survey Settings
Enable Survey:
When enabled the Survey checkbox appears for the Send
SMS dialog box enabling a pick list of pre-defined surveys to
be chosen.
Template Folder
Enable Folder:
When enabled the Folder checkbox and pick list appears in
the Send SMS dialog box allowing the user to narrow down
their selection of templates by folders.
20
General Settings continued
Message Settings
Restrict SMS Composing:
--None--
Restrict Template Editing locks down the Send SMS message box
after a template has been chosen but still allows free-form
messages.
Restrict Message Composing locks down the Send SMS message
box completely, only allowing the use of Templates.
Outgoing History exists for
Number:
Last Outgoing Sender
Assigns ownership of inbound messages for known phone
numbers to either the SMS_History.Owner of the preceding
Outbound Message (recommended) or to the record owner of
the object that the Inbound message links to.
Outgoing History does not
exist for Number:
Default App
Configuration
For unknown unsolicited inbound messages where the phone
number is unknown in Salesforce, sets the SMS_Histor.Owner to
the user defined in the "SMS App Owner Name" setting.
Create task while Auto-
forwarding Emails:
When Email Alert To Owner is enabled or when the Auto-
Forward Email feature is enabled, this feature creates a
Salesforce Task record for the notification email sent to the user.
The task is linked to the Contact/Lead record or whatever record
the incoming messages is linked to.
Relate incoming with last
Outgoing:
Use this important setting to relate all Incoming messages with
the preceding Outbound message. Used for Incoming
SMS_History.Owner notification, linking the inbound to the
record that the Outbound was linked to (such as a Case) and
highly useful when processing Inbound keywords to make sure
that the answer to a question is in context to the question
(template) being asked.
Enable SF1 push notification:
The feature is more appropriately named “Create Chatter
Messages” for inbound messages. This can be useful when
working from Salesforce 1 on the phone as the users will just see
all the Inbound Messages in the Chatter feed.
Keyword for reply from
Chatter:
#Reply
When the "Enable SF1 push notifications" is enabled (Chatter
messaging posting for Inbounds msgs), then one can use the
hashtag plus keyword syntax to comment in the Chatter Feed
and it will send an Outbound SMS. e.g. For an inbound message
in the chatter feed, reply to the post with #reply <your
message>. The text after the #reply is sent as outbound SMS.
Settings for Lead Convert
Action
Enable Trigger/Scheduler to
relate SMS records to
converted
Contact/Account/Opportunity:
When Leads are converted this feature allows any previous and
unsent Scheduled SMS records to re-attach themselves to the
Contact that is created in the Lead Conversion process. They will
then be sent from the Contact at the previously defined
date/time.
Run scheduler in Admin
context to relate SMS records:
Daily Run
When leads are converted, the Lead.Owner executes the
process and often does not have permissions to edit
SMS_History records which he does not own himself, such as
when another user is also texting the Lead. Therefore, when the
lead is converted the other users SMS_History remains "stuck"
on the converted lead. This setting is a workaround which runs
under the context of the Sys Admin and resolves those orphaned
SMS History records to the new Contact.
21
Custom Object Configuration
When configuring 360 SMS for additional standard objects or custom objects there are a few quick steps to
perform:
1. Create a custom Send SMS button(s) and place them on the Page Layout and/or List View
2. Create a custom Conversation View Visualforce page, if desired
3. Add the object and designated mobile phone field to the 360 SMS Object Setup
4. Create a Lookup field to your custom object on the SMS_History object
5. Add the field named SMS_Opt_Out to your Custom Object
Button Creation
1. Create the button code using the Button Code Generator
a. Access the button code creator via the SMS App Help tab shown in Figure 16, then define the
Object and Button Type.
i. Detail Page Button Single one-on-one SMS this button goes on the page layout
ii. List View Button used for Batch SMS this button goes on the List View
b. Copy the code as shown in Figure 16.
2. Proceed to Salesforce Setup and to your Object settings - Figure 17
a. As shown in Figure 17, create a new button and paste in the Code from step 1b.
b. We recommend that you distinguish the api name of the button(s) between the Detail Page
Button (single SMS) vs. the List View Button (Batch SMS), e.g. Send_SMS_Single, Send_SMS_Batch
3. Place the button on the page layout or List View (Batch SMS)
Figure 16 - Custom Button Code creator
22
Figure 17 - Defining a Salesforce Classic button for Detail Page or List View (Batch SMS)
Field Creation
1. Create a Lookup Field on the SMS_History object referencing your custom object, e.g.
SMS_History.Job_Listing_Contact in the example above.
a. This will automatically add the field to the SMS History page layouts and the SMS_History Related
List to the page layout of your custom object if you let it and which we do recommend.
2. Create a field named exactly SMS_Opt_Out on your custom object. It’s API name will become
SMS_Opt_Out__c (this is required for the Convo View and Send SMS buttons and will present you with a
friendly error if the field doesn’t exist). You may optionally place the field on the Page Layout.
3. The Scheduled SMS object should also be modified to add a lookup field for your customer object just like
the SMS History.
23
Conversation View Creation
There is currently no Conversation View creation button, perhaps because the process is so easy.
1. Goto Salesforce Setup and search “Pages”
2. Create a new Visualforce page as shown in Figure 18 using the code provided below. Switch out the
StandardController to your own object.
Grant permissions to your Visualforce page either via standard Salesforce Profiles or clone the SMS App
Permission Set and then add the page in the Visualforce Pages section of the permission set. Refer to the Security
section for more about Security and Permission Sets.
Figure 18 - Conversation View for a custom object
Copy this code and modify the object to create a custom object Conversation View page:
<apex:page standardController="Job_Listing__c" sidebar="false"
docType="html-5.0" standardStylesheets="false" showHeader="false"
applyHtmlTag="false" applyBodyTag="false">
<tdc_tsw:SMS_Conversation_Component />
</apex:page>
24
Object Configuration
As noted in the basic configuration section, you need to define the object and its phone field(s) to enable
Outbound/Inbound SMS to and from that object. With custom objects it is common to use a formula field that
points back to the Contact.MobilePhone field. However, one may also use standard editable phone fields. The
Phone API pick list displays formula fields of type TEXT and fields of type PHONE.
In Figure 19 we have an object which is the child object of a Job_Listing object and a Contact object, in other
words, many Contacts that might be interested in a Job Listing. Thus, we have created a formula field named
Contact_Mobile_Number which pulls from the Contact.MobileNumber.
Figure 19 - Define objects and phone fields
25
Security & Licensing
360 SMS utilizes standard Salesforce security and licensing to grant users access to the various objects, buttons
and functionality required for texting.
The easiest security approach is to add Users to the SMS App Permission Set which is created at installation time.
As this is a managed permission set it cannot be edited other than to Add Users.
Consider cloning this permission set and using your cloned version instead, especially if you are creating additional
Conversation View Visualforce Pages. That way you need only add custom Conversation View pages to the cloned
permission set.
Additionally, since 360 SMS is a native Salesforce application it honors all Security and Sharing Rules, so it is
possible for some users to not see each other’s SMS History records depending on how your security is
configured.
Figure 20 - Add Users to the SMS App Permission Set to grant them security to objects and functionality
Licensing
The application is licensed per user like most Salesforce Apps. Each user that needs to send an outbound SMS
must be licensed. Additionally, the user must be licensed to see the Conversation View VisualForce page and the
SMS_History related list.
26
Note for Trial/Evaluations: During the Trial/Evaluation of 360 SMS the application is licensed for unlimited users,
so you can ignore this licensing section.
As with all managed and licensed Salesforce Apps, licensing is managed from the Installed Packages page within
Salesforce Setup. Simply press the Manage Licenses and add the users.
Figure 21 - License Management for 360 SMS
SMS History Visibility Between Multiple Users
360 SMS ships with the visibility to SMS History items set to PRIVATE. This means that users can only see their
own SMS HISTORY records. If this behavior is not desired, i.e. all users should be able to see each others SMS
History but still honor the Salesforce Security Hierarchy, then simply change the sharing rule from Private to
Public Read/Write.
Figure 22 - Sharing Settings for the SMS History Object
27
User Configuration
In addition to Security, users must be configured in the 360 SMS User Configuration table. As shown in Figure 23,
each user must be matched to one or more phone numbers. Some organizations elect to use a single number
where all users utilize the same number. Other organizations assign numbers to departments or even each
individual. If a user is assigned to more than one number, a Pick List appears for them to pick which number to
use for Outbound messages. The pick list is controlled solely by the User Config table. If the user is only matched
to one number, they never see the pick list.
Figure 23 - User Configuration assigns numbers to each user and defines Alerts and SMS_History Ownership
User Configuration Options Explained
Option
Definition
User
The Salesforce User. A single user may be related to multiple numbers in which case he will
see a picklist of numbers to SEND SMS from when sending outbound SMS.
Number
An SMS Enabled number purchased or ported from an existing Land Line to have its SMS
Path enabled. Multiple users may be related to a single number and vice versa.
Country
Different numbers must be used for different countries (USA/Canada are the same). Phone
number costs and the cost of outbound SMS messages vary greatly by country.
Auto Forward Mobile
Allows inbound messages to be forwarded to a personal mobile number. You cannot reply
from your personal number though.
Auto Forward to Email
Allows inbound messages to be forwarded to an alternate email address other than the
owner. Note that the Email Alert To Owner option already emails the owner.
Email Alert To Owner
When enabled a pre-defined (and customizable) email alert is sent to the
SMS_History.Owner displaying the actual text message plus hyperlinks to the related
Salesforce records. Utilizes a standard Salesforce Email Template which can be modified if
desired. Review the “Reply to Email Alert” section to learn how users can reply to the alert
to send an outbound SMS reply. Great for phone users that don’t want to use Salesforce1
to reply.
Default SMS Owner
Resolves the SMS_History.Owner to this user when an Incoming message arrives without a
previous Outbound message. Ownership rules are also governed by the preceding
Outbound message or by the parent Objects owner field. Only one user per number can be
designated as the Default SMS Owner.
28
SMS Templates
360 SMS provides the most robust SMS Templates among all SMS apps in the Salesforce AppExchange especially
with regard to its ability to traverse the object structure to obtain the appropriate merge fields. The merge tag
syntax matches Salesforce Email Templates so one can literally copy/paste and edit existing email templates if
desired, be mindful that no one likes receiving a long text message like you see in an email though.
Templates are accessed via the Send SMS dialog
Templates can be categorized by folder for easier management and selection from the Send SMS dialog
Templates are required for initiating Outbound SMS via Process Builder
Figure 24 - 360 SMS Templates
29
Incoming Alerts
There are numerous ways to be alerted about incoming messages. First with a
dashboard element that can be placed on:
Salesforce Classic Dashboard
Lightning Dashboard
Lightning Utility Bar
Salesforce1 Navigation Item
Secondly, via Automatic Incoming Notification email alerts, defined in the User
Configuration section of this document.
The criteria that is used is as follows:
1. SMS_History.Type = Incoming
2. SMS_History.Owner = Current User (or if sharing rules option is enabled
those records as well).
3. SMS_History.Read = False
Classic Home Page component
1. Saleforce Setup -> Search on the term “Home Page” and edit the Home
Page Layout as shown in Figure 25
2. Enable the Incoming Alert component as shown in Figure 26
3. Press Next and arrange your Narrow Components with the Incoming Alert
on top if desired.
Figure 25 - SF Classic Home Page Layouts
30
Figure 26 Enable the Incoming Alert Component
Items in the “Narrow Components” section can display on all Salesforce pages when the User Interface setting for
Side Panels is enabled. Go to Settings, then search “User Interface” and turn on Show Custom Sidebar
Components on All Pages as shown in Figure 27.
Figure 27 - Turn on Sidebar Components to see the Inbound Alert on all pages
31
Lightning Home Page Component
With Lightning, the dashboards are modified via the Lightning AppBuilder.
1. Salesforce Settings > search Lightning AppBuilder or while on the actual dashboard choose Edit Page
which will open the Lightning AppBuilder for that page.
2. Choose whichever dashboard you want
3. Choose the VisualForce component and drag it into the desired location
4. The Incoming SMS dashboard component is named Incoming_Alert_SLDS, set it’s height to at least 500
pixels.
32
Lightning Utility Bar Component
Salesforce Lightning has a feature called the Utility Bar which
allows one to place dashboard components like the SMS
Incoming Alert onto the utility bar for quick access.
To configure:
1. Salesforce Setup then search App Manager
2. Choose the App that you want it to appear on
3. Select the Utility Bar option
4. Add a new Utility Bar item using the ADD button
5. Choose VisualForce for the component type
6. Configure the VF component by choosing the
“Incoming_Alert_SLDS” page
Figure 28 - Configure Lightning Utility Bar for an App
33
Incoming Alert for Salesforce1
The Incoming Alert component can also be added to the Salesforce1 navigation via these steps:
1. Salesforce Setup Salesforce Navigation
2. Add the Incoming Alert component to the Mobile Navigation as shown in Figure 30
Figure 29 - The incoming alert component works seamlessly on Salesforce1
Figure 30 Configure Salesforce Navigation to the add the Incoming Alert to the Salesforce1 Navigation
34
Reply to Email Alert Configuration
360 SMS provides the unique capability to REPLY to the Incoming SMS Notification email and have the text of that
reply be sent as an Outbound SMS to the customer. This adds great value to users that may be on their phones
and don’t want to use the Salesforce1 Mobile app to respond (even though the Incoming Notifications makes that
extremely easy as well).
This section explains how to set-up the standard Salesforce Email Service that facilitates this feature.
Figure 31 - Reply to email from your desktop or phone sends an outbound SMS to customer
35
Creating the 360 SMS Email Service
1. Go to Salesforce setup and type ‘Email services’ in the ‘Quick Find’ box and Setup -> Develop -> Email Services
2. Click on ‘New Email Service’
3. Fill out the details as shown in Figure 32:
Email Service Name: 360 SMS Incoming
Apex class: ReplyFromEmailToSMS
Accept attachments: All
Active: True
4. Click on ‘Save and New Email Address’
Figure 32 - Define the 360 SMS Email Service
6. Now enter the following details and Save
Email Address Name: SMS_Incoming
Email Address: SMS_Incoming
Active: True
Context User : Usually an Admin or Service User
Accepted Email From: Comma separated list of user emails or leave it empty for all users
36
7. Now, we must copy the email address generated in Step 6 to the 360SMS General Settings.
Figure 33 - General Settings - Email To SMS
8. That’s it! You may not reply to your Incoming Alert Emails and your reply text will be sent as an Outbound
SMS.
37
Incoming Email Alert Email Templates
The 360 SMS Incoming Notifications uses standard Salesforce Email Templates
that are installed with the product. You may optionally edit these templates for
your own purposes.
IMPORTANT:
The algorithm to process the Reply Email looks for two specific strings in the
email (Sender Number: and To Number: ). Even though you may be tempted to
change these, the labels and even the lack of space after the colons are
important to parse out the messages. You also cannot use these labels (Sender
Number & To Number) anywhere else in the HTML as these are used to find the
key info after the colon.
Sender Number:+13038757163
To Number:+17206050632
Edit the Template
1. Go to Salesforce Setup and type ‘Email Templates’ in the ‘Quick Find’ box.
2. 360 SMS uses the template named Incoming Message Alert for the incoming email notification.
3. Edit the Incoming Message Alert as desired, specifically the HTML version
4. We suggest editing the Incoming Message Alert with the suggested code snippet we have provided
below. This has been modified to fit on a phone, uses HTML table tags for nicer formatting and has some
fixes to the hyperlinks.
Figure 34 - Edit the default email template for Incoming Message Alerts
38
---------------------------------------------------------------------------------------------------------------
Recommended HTML Template (copy/paste this code)
####### Reply Above To Send Outbound #######<br><br>
<b>Message:</b><br>
<i> {!tdc_tsw__Message__c.tdc_tsw__Message_Text_New__c}</i>
<br><br>
<table border="0">
<tr><td colspan="2"><b>Click the links to view in Salesforce:<b></td></tr>
<tr><td valign="top"><b>Links:</b></td><td
valign="top">{!tdc_tsw__Message__c.tdc_tsw__Related_Object_Id_URL__c} or <a
href="https://login.salesforce.com/{!tdc_tsw__Message__c.Id}" target="_blank">Incoming Msg</a></td></tr>
<tr><td valign="top"><b>Sender:</b></td><td
valign="top">{!tdc_tsw__Message__c.tdc_tsw__Sender_Name__c}</td></tr>
<tr><td valign="top"><b>Message:</b></td><td
valign="top"><i>{!tdc_tsw__Message__c.tdc_tsw__Message_Text_New__c}</i></td></tr>
</table>
<br>
<b>*** IMPORTANT - DO NOT MODIFY ***</b><br>
<b>Sender Number:</b>{!tdc_tsw__Message__c.tdc_tsw__Sender_Number__c} <br>
<b>To Number:</b>{!tdc_tsw__Message__c.tdc_tsw__ToNumber__c}<br>
Default Out-of-Box Email Template (in case you need to revert back)
#################### Reply Above ####################<br><br>
Hello, <br><br>
You have received an incoming message. <br><br>
<i> {!tdc_tsw__Message__c.tdc_tsw__Message_Text_New__c}</i> <br><br>
To view the message, click
<a href="https://login.salesforce.com/{!tdc_tsw__Message__c.Id}" target="_blank">Here</a><br><br>
To view associated record, click
<a href="https://login.salesforce.com/{!tdc_tsw__Message__c.tdc_tsw__Related_Object_Id__c}"
target="_blank">Here</a><br><br>
<b>More Details:</b> <br>
<b>Sender Name:</b>{!tdc_tsw__Message__c.tdc_tsw__Sender_Name__c} <br>
<b>Sender Number:</b>{!tdc_tsw__Message__c.tdc_tsw__Sender_Number__c} <br>
<b>To Number:</b>{!tdc_tsw__Message__c.tdc_tsw__ToNumber__c}<br><br><br>
Thanks , <br><br>
360 SMS App for Salesforce <br><br>
39
MMS
MMS is the industry standard term for sending/receiving Pictures and other file types such as PDF, via text
messaging. MMS requires a separate installer link that you can obtain by writing to Sales@360DegreeApps.com.
360 SMS allows for both Outgoing and Incoming MMS. Attached files are stored natively in Salesforce in the
SMS_History.Attached_Files field which uses the native Salesforce Document object. The attached pictures and
files display directly on the Conversation View as well. See Figure 35.
Once installed follow these steps to configure your org:
1. Add the Send MMS button to your page layout (similar to the basic configuration instructions)
a. Like the Send SMS button there is one button for Classic and a 2
nd
one for Lightning and
Salesforce1. Use the one named tdc_tma__Send_MMS for Classic.
2. Add the Send MMS button to your Search Layouts (List Views) to enable Batch MMS
a. Batch MMS stores only a single copy of the File(s) for efficient storage, then all the SMS_History
records point to this single file.
3. Expose the SMS_History.Attached_Files field on your SMS History Related List (optional if using Convo
View)
4. Note: MMS requires Content-Delivery to be enabled. Create a Case with Saleforce if Content Delivery is
not enabled.
5. File Types Supported:
a. .jpeg
b. .gif
c. .png
d. .bmp
e. .mpeg
f. .pdf - although the interface lets you choose PDF’s most mobile phone providers now block PDF
6. MMS is not available with Professional Edition or Group Edition.
7. If you only want a single button to handle both regular SMS and MMS, simply create a custom “Send
SMS” button using the MMS button code and remove both of the managed package buttons from their
locations. It is completely fine to send an SMS using the Send MMS button without attaching any files.
8. Refer to the Send SMS with Process Builder section for documentation on triggered/automated MMS
40
Figure 35 - MMS stores attachments in native Salesforce Documents object, easily accessible from Convo View or Related List
41
Hyperlink Clickthrough Tracking
360 SMS provides the unique capability to send hyperlinks via SMS and have the clickthrough’s tracked against
the SMS History record. The clickthrough statistics are stored in the Message URLs related list of the outbound
SMS History. One can write powerful reports and Process Builder automations based on this data, making 360
SMS truly unique in its SMS Marketing capabilities.
Figure 36 - Outbound SMS link click tracking
Key Points:
1. You must write to [email protected]m to request that Link Tracking be enabled.
2. Uses standard Salesforce Sites technology that must be configured to communicate the clickthrough data
back into Salesforce. Thus, Sites must be setup as documented in the following section.
3. Link Tracking is not supported on Salesforce Professional Edition because it doesn’t support Sites.
4. When combined with the optional Bit.Ly integration, regular links entered into outbound messages
convert to bit.ly links automatically and when the link is tracked it un-encrypts the bit.ly link back into a
friendly readable link.
5. The bit.ly integration is not required, without it the links simply go out as they were typed.
6. An outbound SMS with a link always creates a Message URL record so that its easy to report those
records with and without a clickthrough. The Clicks Count will simply remain at 0 if never clicked.
7. Only one link can be sent and tracked per outbound SMS
42
Figure 37 - Call your sales person or email to [email protected] to enable Link Tracking
Define a Clickthrough Email Alert
One can easily define a Process Builder which sends the SMS_History.Owner an email alert when a link is clicked
and of course if you can do that, you can trigger any sort of additional automation or field updates when a link is
clicked. Here’s a quick example:
1. Create an Email Template using fields from the Message_URL object
2. Create a Salesforce Email Alert from the Template
3. Create a Process Builder on the Message_URL when Click > 0, then
trigger the Email Alert
4. The HTML code snippet used to create this alert is on the following
page.
Figure 38 - SMS Link Clicked Alert
43
HTML for the SMS Clickthrough Alert
Use this html code snippet to create your own SMS Clickthrough Alert
One of your links in an SMS was just clicked. <br><br>
<table border="0">
<tr><td colspan="2"><b>Click the hyperlinks to view in Salesforce:</b></td></tr>
<tr>
<td valign="top"><b>{!tdc_tsw__Message_Url__c.Related_Object__c}:</b></td>
<td valign="top"><a
href="{!tdc_tsw__Message_Url__c.Related_Object_URL__c}">{!tdc_tsw__Message_Url__c.Related_Obje
ct_Name__c}</a></td>
</tr>
<tr><td valign="top"><b>URL Clicked:</b></td><td
valign="top">{!tdc_tsw__Message_Url__c.tdc_tsw__UrlLink__c}</td></tr>
<tr><td valign="top"><b># Clicks:</b></td><td
valign="top">{!tdc_tsw__Message_Url__c.tdc_tsw__Clicks__c}</td></tr>
<tr><td valign="top"><b>1st Click:</b></td><td
valign="top">{!tdc_tsw__Message_Url__c.tdc_tsw__First_Click__c}</td></tr>
<tr><td valign="top"><b>Last Click:</b></td><td
valign="top">{!tdc_tsw__Message_Url__c.tdc_tsw__Last_Click__c}</td></tr>
<tr><td valign="top"><b>Link Dtl:</b></td><td valign="top"><a
href="{!tdc_tsw__Message_Url__c.Link}">SF Record</a></td></tr>
</table>
<br><br>
<br>
Related Object: {!tdc_tsw__Message_Url__c.Related_Object__c}<br>
Related Obj ID: {!tdc_tsw__Message_Url__c.Related_Object_Id__c}<br>
Note that the HTML above does use three custom formula fields pulling from the parent SMS_History record since
Salesforce Email Template Merge tags cannot traverse to a parent object.
Related_Object__c
tdc_tsw__SMS_History__r.tdc_tsw__Related_Object__c
Related_Object_Name__c
IF ( Related_Object__c = 'Contact',
tdc_tsw__SMS_History__r.tdc_tsw__Contact__r.FirstName & " " &
tdc_tsw__SMS_History__r.tdc_tsw__Contact__r.LastName,
IF (Related_Object__c = 'Lead',
tdc_tsw__SMS_History__r.tdc_tsw__Lead__r.FirstName & " " &
tdc_tsw__SMS_History__r.tdc_tsw__Lead__r.LastName,
""
)
)
Related_Object_URL__c
"https://YourDomainHere.my.salesforce.com/" & Related_Object_Id__c
44
Salesforce Sites
360 SMS offers automatic updating of the Delivery Status of outbound SMS Messages as well as Hyperlink Click
Tracking using standard Salesforce Sites technology.
Because, these services are writing into your Salesforce system to update various fields, we must use the standard
Salesforce Sites technology to create this communication channel. The site runs as its own user profile so we must
also give it security access via the standard SMS App Permission Set.
Note: Sites are not supported in Salesforce Professional Edition and thus Delivery Status and Link Tracking are
not available for Professional Edition.
When we’re all done, we’ll have something like shown
Figure 39 - Incoming SMS Sites needed for Delivered Status and Link Tracking
Create a Salesforce Site:
1. Go to Setup Quick Find Sites
2. You may or may not have a primary site already created for your org such as shown in Figure 41. If no site
has been previously created, you must create one, Figure 40.
3. From Figure 41, press NEW to create a new Site
4. Make the new Site look exactly as shown in Figure 42.
5. When the Incoming SMS site has been created, copy its Site URL and paste it into the
SMS Set-up General Settings Site URL, as shown in Figure 43.
6. The new Incoming SMS site runs under its own security profile and thus we must give it access to all the
various 360SMS items by putting it into the same Permissions Set as regular users, see Figure 44 for the
steps to get there
Figure 40 - Salesforce Sites - no previous site has been created so we must make one for the first time.
45
Figure 41 - Create a new Site
Figure 42 - Incoming SMS site for Delivery Status and Link Tracking
46
Figure 43 - Set the Site URL to the Incoming SMS Site which was just created
Security for Salesforce Sites
Because the Incoming_SMS site accesses Salesforce like other users, we must give the Incoming_SMS site user
the same permissions that a regular user would have. We do this by simply adding the Site/User to the out-of-box
360SMS Permission Set (SMS App Permission Set). Figure 44 illustrates the steps as it’s a long haul to get to
Permission Sets from the Sites record.
Additionally, the Site User must be assigned a 360 SMS license. As the Site User is a special kind of user you do
this from the same Site User record where the Permissions Sets was just added. Figure 45 illustrates that you use
the Managed Packages related list to then Assign Licenses to the Site User.
47
Figure 44 Put the Incoming_SMS special service user into the SMS App Permission Set
48
Figure 45 - The Site user must also be assigned a 360SMS license - do this from the Managed Packages related list on the Site User record
49
Delivery Status
360 SMS updates the SMS History.Delivery Status field between values of SENT and DELIVERED when the Sites
Configuration above has been configured. This allows delivery reporting.
When the outbound message is initially sent, the Delivery Status = Sent and then after the providers report back
to 360 SMS, the service updates the Salesforce status to Delivered. Alternatively, you may elect to display the
Delivered SMS checkbox which is governed by the same logic.
Figure 46 - Delivery Status is updated when the Salesforce Site has been configured
50
SMS from Salesforce Reports
360 SMS is unique among SMS apps with its ability to use the native Salesforce Reports to execute Batch SMS.
Many apps can send Batch SMS from Campaigns and from List Views, but List Views have two major limitations:
1. Limited to 250 rows of selectable data
2. No ability to do complex cross object queries such as “Contacts that were sent an SMS using Template =
XYZ and which have ClickCount = 1 for the HyperLink Tracking
Key Points:
1. When using reports with multiple objects the primary object must be the object you’ll be texting from.
Primarily it must expose its Record ID field, e.g. Contact ID
2. Supports Tabular Reports and Summary Reports
a. Tabular Reports
i. By default, the feature sends messages for the first 2,000 records then stops.
ii. Use the “Enable Reports Running for more Records (up to 40K)” checkbox in the reports
interface to go beyond 2,000 records. As of this writing the label is actually wrong, you
can send SMS to unlimited records.
iii. See the “Sending > 2,000 Records” section below for a required special field on the report
iv. Sending large batches can take between 3 5 minutes
b. Summary Reports
i. Summary reports can only send up to 2,000 records due to Salesforce limitations
Figure 47 - SMS from Reports screen - pick your report first, then define your Record ID column and Send SMS!
51
Figure 48 - After the Send SMS button is pressed, choose a template
Sending > 2,000 Records
When using the Enable Reports Running for more Records (up to 40K) option your report must have a special
custom field of type AutoNumber and the report must be sorted by this AutoNumber field in Ascending order as
the reports primary sort field, in order for the technology to loop through the records correctly.
The field label and name can be whatever you like but the format and starting number needs to be EXACTLY as
shown in Figure 49 and the “Generate Auto Number for existing records” must be checked.
Figure 49 - A special AutoNumber field for the object must exist on the report and the report must be sorted in Ascending order by this field
as the primary sort
52
Send SMS with Process Builder
Salesforce Process Builder is a no-coding method to easily handle triggering Outbound Text Messages as well as to
process Incoming Messages based on Keywords or other factors. One can literally trigger on any object.
Common objects to trigger off of are:
Lead/Contact Common use cases are when various fields change and you want to trigger an Outbound SMS.
Custom Objects Similar to Lead/Contact use cases. 360 SMS supports triggered messages from any custom
object and its SMS Templates support all custom objects.
SMS_History Especially useful for incoming SMS read the message and do something else based on the
Incoming Message, either updating the Salesforce record or sending out some other question based on the reply.
Useful for Surveys, i.e. Reply with INTERESTED or NO and then SMS_History.Message = INTERESTED updates a
field or status in the corresponding Salesforce record.
There are two primary methods of triggering an outbound SMS:
Method #1 Simple: This is good for customers new to process builder
Method #2 Apex Class: This is the preferred method as the formula fields it uses allow for comments and you
can easily copy/paste it to other process builders.
Figure 50 - Salesforce Process Builder is a no-coding method to easily handle triggered Outbound SMS as well as to process Incoming SMS
based on Keywords or other factors.
Method #1 Simple
A few simple settings is all it takes to trigger a message:
1. Set CREATE OBJECT to Scheduled SMS
2. Scheduled SMS Name: Must be the ID field of the triggered object/record. This is used primarily in
conjunction with the SMS Template and must match by object in order for the merging to occur, i.e.
53
Supply a Contact.Id and a matching SMS Template based on the Contact object.
3. Related Object Id: Set the Related Object Id to Lead.Id or Contact.Id. Hint you can also set it to other
objects to gain visibility to the text conversations, i.e. set it to a Account ID and the SMS History attaches
there. However, it will then not set the SMS_History.Contact_Id, so we recommend instead using a
Process Builder to attach SMS_History to parent objects.
4. SMS Template: Set the ID of the Template to be used. This can be obtained from the URL of the template.
You may also use a reference field such as Contact.SMS_Template (if you’ve created a SMS Template Id
on your Contact, see the section below titled Create a Master Send SMS Handler).
5. Sender Number: Set the Sender Number (this is your number that you are sending from) this can also be
a referenced field such as Lead.Owner.Mobile (so as to send from different sales people). This field is
OPTIONAL. If you only have one outbound number in your org, it need not be supplied.
6. Phone Api: Supply the phone field to send the message to. Normally you pull this from the record, i.e.
Lead.MobileNumber
Figure 51 - In this scenario we are pulling the Template from a custom field we placed on the Lead for even easier automation. Now you can
have other process builders that only need to set the Lead.SMS_Template and that alone will trigger an outbound SMS.
54
Relating Outbound SMS to Parent Object
Although one can use the Related Object Id to set the Outbound SMS to another object it may have the
undesirable effect of then not being able to link the SMS History to the record that initiated the SMS.
For example, if wanting to trigger a message from a contact but have the message appear under the Account, one
can set the Schedule SMS Name to the Contact.Id and the Related Object Id to Contact.AccountId. However, then
the message does not show up under the Contact. Usually this is undesirable. Instead, consider setting the
Related Object Id to the Contact.Id and instead write a process builder on SMS History to set the
SMS_History.Account.Id = Contact.Account.Id whenever SMS_History.Contact_Id is not null.
55
Method #2 Apex Class
360 SMS also has an Apex class that can either be called in code or via Process Builder. There is an Apex class for
sending regular SMS and another one for sending MMS which includes a parameter for the picture or file.
The Apex classes accept parameters in a comma separated string that you pass to the param field of the Apex
class. This method is the preferred method as it’s easy to copy/paste the code between PB’s and Salesforce
allows comments in formula fields, so we strongly recommend commenting your formulas using the /* some
comment */ syntax.
Send SMS From Process Builder
For the regular Send SMS From Process Builder Apex Class the string of parameters is defined as:
Param1: Id of the primary object you are triggering from this must match your Template object and it will be
the primary object that the outbound SMS will relate to.
Param2: The API name of the phone field for that object.
Param3: A template Id pulled from the URL of an SMS Template it’s object must match the object defined in
param1
Param4: Optional originating phone number, if blank it sends the default phone number for the org or the first
phone number found in the 360 SMS User Configuration tables for the current user.
Figure 52 - Code example of sending regular SMS via the "Send SMS From Process Builder" Apex class
56
Send MMS from Process Builder
For the Send MMS from Process Builder Apex Class the string of parameters is defined as follows and shown in
Figure 54.
Param1: Id of the primary object you are triggering from this must match your Template object and it will be
the primary object that the outbound SMS will relate to.
Param2: The API name of the phone field for that object.
Param3: A template Id pulled from the URL of an SMS Template it’s object must match the object defined in
param1
Param4: Optional Document ID of the picture or file to send
Param5: Optional originating phone number, if blank it sends the default phone number for the org or the first
phone number found in the 360 SMS User Configuration tables for the current user.
Figure 53 - MMS automation with keyword "Picture" sending pic of the Lead.Owner
Figure 54 shows a completely dynamic solution where the picture is derived by navigating to a custom field on
the User record via SMS_History.Owner and the outbound phone number is also gathered from the User record.
Most of the time you will be dynamically setting the Pictures and Outbound Number.
57
Figure 54 - PB code for executing triggered MMS via the "Send MMS from Process Builder" Apex class this example is triggering off an
inbound message with keyword “PICTURE”. We obtain the picture by traversing up to the USER object and accessing a custom
Picture_Doc_Id field. We use the SMS_History.To_Number to send back the reply.
Dynamically setting the Outbound Number
No matter which method one uses, it is common that the automation should send the Outbound SMS from the
record owners unique SMS Number. Many orgs use separate numbers for each user. These are defined in the
SMS Setup User Configuration which is not accessible via process builder. However, with a simple
customization to your USER object you can make your Process Builders dynamically obtain the Outbound SMS
Number parameter that either method makes available as an optional parameter.
Simply, create a custom text field named something like User.SMS_Number. Then copy the number associated to
each user into the field. DO NOT attempt to use the standard User.MobilePhone field as Salesforce formats this
number on you, such as (720)605-0632. The number needs to be completely unformatted and have the country
code prefix, i.e. 17206050632.
As shown in Figure 54 you can now traverse to the User table via the SMS History.Owner or
Lead.Owner/Contact.Owner and get the number from your custom field.
A second common scenario is to dynamically set the SMS Number parameter based on the Incoming Message.
This is common when responding to Keywords. In this case, you don’t need to lookup the number from a user
table, you simply need to get it from the SMS_History.To_Number field (the number that the customer wrote to).
However, be careful as the value will have a “+” character in front of it which is invalid for an outbound number,
so you must use the SUBSTITUTE function as shown below to remove the +. The formula is provided below for
easy copy/pasting.
58
/*********************************************************************
APEX Parameters Defined:
Param1: Id of the primary object - pulled from SMS_History.ContactId
Param2: The API name of the phone field for the contact object.
Param3: Template Id:
Param4: Optional Outgoing Phone # - pulled from Inbound SMS_History.To_Number but
we have to remove the + that is inherent with inbound numbers
Carefully note the placement of the commas
***********************************************************************/
[tdc_tsw__Message__c].tdc_tsw__Contact__c & ',' &
'MobilePhone' & ',' &
'a08f400000Dfo3fAAB' & ',' &
SUBSTITUTE([tdc_tsw__Message__c].tdc_tsw__ToNumber__c , '+', '')
Dynamic MMS such as sending a picture of a particular user
Similar to a dynamic outbound number, one can create a custom field on the User record that holds the
Document Id of a previously stored picture. In Figure 54 above we simply uploaded a Picture to the Salesforce
Document object and manually copy/pasted the actual ID of the picture into a custom field named
User.Picture_Doc_Id. We obtained the Document Id from the URL when we opened the picture.
For ease of copy/pasting the code for the Dynamic MMS has been provided below.
/*********************************************************************
APEX Parameters Defined:
Param1: Id of the primary object - pulled from SMS_History.ContactId
Param2: The API name of the phone field for that object.
Param3: Template Id: Contact - Trigger Response - PICTURE keyword
Param4: Document Id pulled from the Owner.Picture_Doc_Id field
Param5: Optional Outgoing Phone # - pulled from Contact.Owner --> User.SMS_Number
(custom)
Carefully note the placement of the commas
***********************************************************************/
[tdc_tsw__Message__c].tdc_tsw__Contact__c & ',' &
'MobilePhone' & ',' &
'a08f400000DflORAAZ' & ',' &
[tdc_tsw__Message__c].tdc_tsw__Contact__c.Owner.Picture_Doc_Id__c & ',' &
[tdc_tsw__Message__c].tdc_tsw__Contact__c.Owner.SMS_Number__c
59
Create a Master Send SMS Handler
Figure 51 above introduced the concept of creating a single Process Builder that triggers via the OnChange of a
custom field which you add to your object. We recommend adding the SMS_Template_Id lookup field to a Lead,
Contact or any custom object. Then as shown in Figure 56 you can have numerous process builders that trigger
outbound messages but all you will need to do is update the Contact.SMS_Template with whatever template you
want to send. This centralized approach means that you won’t have to create the same Send SMS action
repeatedly, whether that be Method #1 or Method #2.
Of course, there will be many times when you will not want to use your Master Send SMS Handler such as when
the outbound number needs to come from a different number or perhaps when you need to trigger an MMS.
Figure 55 - When the SMS Template is changed - trigger the outbound SMS, Figure 2 shows the Immediate Action
Figure 56 shows a perfect example where we have a survey with multiple answers and it needs to trigger a
different template per response. It would be a hardship to write the APEX code for each possible answer over and
over again. So instead, we just set the SMS_Template for the contact and let our other Process Builder do the
work!
60
Figure 56 - Demonstration of the easier way of triggering an SMS via a change to the Contact.SMS_Template_Id (custom formula and
matching PB)
Drip Campaigns
A common automation task is what is commonly referred to as a Drip Campaign, whereby you place a
Contact/Lead into a Campaign or even trigger any Process Builder and then you want to keep Texting the
Contact/Lead periodically until they respond to your Call-To-Action such as replying with a keyword or clicking a
trackable link.
There are of course other methods to construct a Drip Campaign, but this method described below is the easiest
to maintain.
In this example below, we have created two custom fields on the Campaign_Member object and one custom field
on the Contact:
Campaign_Member.SMS_Template_Id: Lookup field to the SMS_Template we move the person through the
drip by setting the SMS_Template to a new template at each stage. You could also avoid this step by using the
APEX method of sending an SMS at each stage. This method triggers a call to another PB which looks for changes
to Campaign_Member.SMS_Template and triggers the SMS, just for easier centralized coding.
Contact.SMS_Stop_Drip: Checkbox field on the Contact record, since incoming SMS will link to Contact we only
have scope to the Contact record and we can mark this field TRUE when the reply to our message.
Campaign_Member.Stop_Drip_Contact: A formula field back to the Contact.SMS_Stop_Drip so that the main PB
that handles the Campaign.SMS_Template OnChange checks the field before deciding to send the next drip.
61
Figure 57 - Step 1: Define the drip campaign - usually starts when a Contact/Lead is added to a Campaign (via CampaignMember)
Figure 58 - This is the master Process Builder that handles all changes to the CampaignMember.SMS_Template and triggers an outbound
SMS
62
Figure 59 - This is my Response Handler handling the keyword responses that stop the drip
Using Salesforce Flows
The Salesforce Flow technology is worth a short discussion as it provides considerably more power than Process
Builder such as the ability to Lookup Records and Mass Update them.
In the examples below, we demonstrate receiving an email address via an Incoming SMS in response to a
template which says, I don’t recognize your number, can I get your email address so I can look you up by
email?
In this particular workflow, we have a new unknown number writing into our Salesforce system. In a previous
Process Builder we have created a new Lead record for this incoming SMS and we start asking them questions to
fill out the record such as Name, Email and Company. However, here we use a Flow called from a process builder
to take the email address and perform a Record Lookup against the contact object. If we find a record, we will
instead send back a template that says, “Found you Contact.Name!” and then proceed with the original keyword
that started the whole process.
Figure 60 shows how a normal process builder can call a Flow passing in parameters that we gather from the
SMS_History record. Figure 61 then shows the details of the flow where it:
1. Lookups up the email from the Contacts object
2. If a contact is found it re-links all the SMS_History that got linked to the dummy lead record which was
created when the SMS from the unknown record first came in.
3. Finally, we can send the outbound SMS reply either via the same APEX methods as a Process Builder uses
or in this case we use the technique shown in Figure 51 where we only update the Contact.SMS_Template
field which in turns triggers our Master SEND SMS Handler.
63
Figure 60 - Example of an SMS_History Incoming process builder triggering a call to a flow.
Figure 61 - A flow which does a Record Lookup based on a response from an inbound SMS with an email address