Sending Mass / Bulk Text Messages
1 to Many Text Messaging
You can use Text Anything to send bulk text messages as “Broadcasts” or by Flow or Apex automation.
Sending Bulk Messages Using “Broadcasts” in the Text Anything App
Sending bulk text messages using the Text Anything Broadcast functionality is easy and wizard-driven. In the Text Anything app for Salesforce:
Prerequisites - Define the Audience
In order to send a Broadcast you need to define a Broadcast Group. This is a list view containing all the intended recipients. A “list view” being a standard Salesforce tool for filtering a list of records for both standard and custom objects, i.e., “contacts” or “leads” around filter criteria, such as the record owner, created date, account or custom field values.
Create a Broadcast
Go to the Broadcast Groups tab
Select “New”
Name your “Broadcast” and select the object and the list view of recipients for your message. NEXT
Are you sending to US phone numbers? If so you will need to specify a campaign on the following screen of the wizard.
Enter your message. You may use pre-defined message templates and optionally include attachments.
Send your message:
You can send immediately OR
Schedule your message to go out at a later time OR
Save as a draft
And that’s it! When your customers respond you will see their responses in the Utility Bar Chat Manager and respond to them individually.
Sending Bulk Messages Using Apex
To send automated text messages using an Apex Class (i.e., a scheduler class or trigger) do the following:
Create a list variable with the name: “textany.TextAnythingSendAutomatedSMSController.Requests”. The inputs of this list variable class are:
recordId (Required)
strFromNumber (Required)
strToNumber (Required)
strSMSBody
strMediaUrl //This should be public URL of image/gif/pdf/csv.
Once the list is ready, call the class method: textany.TextAnythingSendAutomatedSMSController.sendSMSAutomation(LISTNAME);
Note - User needs to provide either strSMSBody or strMediaUrl or both (if sending a MMS). At least one variable cannot be NULL.
list listRequests = new list();
textany.TextAnythingSendAutomatedSMSController.Requests objReq = new textany.TextAnythingSendAutomatedSMSController.Requests();
objReq.recordId = '0030I00002QPWVYQA5';
objReq.strSMSBody = 'This SMS sends from automated queueable class. 1';
objReq.strFromNumber = '+1703XXXXXXX';
objReq.strToNumber = '+1804XXXXXXX';
//objReq.strMediaUrl = '';
listRequests.add(objReq);
textany.TextAnythingSendAutomatedSMSController.Requests objReq1 = new textany.TextAnythingSendAutomatedSMSController.Requests();
objReq1.recordId = '0030I00002QPWVYQA5';
//objReq1.strSMSBody = '';
objReq1.strFromNumber = '+1703XXXXXXX';
objReq1.strToNumber = '+1804XXXXXXX';
objReq1.strMediaUrl = 'https://sample-videos.com/img/Sample-png-image-100kb.png';
listRequests.add(objReq1);
textany.TextAnythingSendAutomatedSMSController.sendSMSAutomation(listRequests);
Sending Bulk Messages Using Salesforce Flows
Sending automated messages with flows is easy and requires the same inputs as sending with an Apex Class.
First create a new action using the “Send SMS” SMS Controller from the Text Anything package.
Next, specify your input values: From Number, Recordid, To Number, optional Media URL and SMS Body.