Guide To Sending Text Alerts In Salesforce

In a world where everyone owns a smartphone, sending out alerts in various ways will find your intended audience. If you’ve got a large database and you need to send out a quick, alert, SMS text messages are still a popular way. While users install and delete apps regularly, a contact number is usually more reliable as this will be the number the customer used when making a purchase or signing up to a service. While sending out emails and other marketing materials/alerts is easy in Salesforce Sales Cloud and Service Cloud, is it possible to send text alerts in the CRM?

Salesforce SMS

The answer is yes. A quick search in the AppExchange brings this list of applications:

Salesforce sms

With various options available for Salesforce users, you can find the perfect app to match your business needs. There are free and paid options depending on how much use you expect to get out of text alerts.


Reasons to use SMS in Salesforce

With the various ways available for sending alerts, why send text alerts in Salesforce? Reasons include:


  • Follow up with leads after the first phone call
  • Keep in touch with top accounts
  • Bulk marketing messages
  • Provide customer updates about a current case


No matter what sector your business is in, there will be a use for text messaging somewhere. Luckily, the apps available on AppExchange work seamlessly with any Org and are very easy to set up. Purus explore two of these apps and how they can benefit your business.


Mercury SMS

Mercury SMS is a paid app developed by Australian business solutions company, Aprika. The app gives Salesforce users a host of features including:

  • Being able to send and receive messages from a live component
  • Creating SMS based on workflow rules in the system which will automatically trigger messages
  • Create records from incoming messages including leads or cases when someone new messages in.
  • Bulk send messages for a campaign or alert issues to issues or bugs
  • Ability to update fields based on incoming or outgoing messages

A message feed in the app allows users to monitor communications in real-time, giving them the option to go through records and respond. With regulations in place across the world over data protection – GDPR in EU countries – Mercury SMS allows your customers to Opt-Out of receiving text messages from your business if they so wish. Recipients send “STOP” and changes can be made with little admin effort. 


How To Set Up Mercury SMS

Mercury SMS can be easily installed into your Salesforce Org through the AppExchange – it’s up to you whether you want the paid option or try the free trial. The process of installation is simple, fill in the required fields and ensure the app has enough permissions to access the appropriate fields. Once completed, place the Lightning Component on the page you wish and you’re set!

The friendly user interface makes it easy to send messages, set up campaigns and monitor messages, making it one of the best text messaging apps available in Salesforce.


SMS Magic Interact

Another application available is SMS Magic Interact. The features it contains include:

  • Send SMS to standard and custom object’s records
  • Easily customisable messaging platform
  • Bulk Text Messages
  • Scheduled SMS

Text alerts can be sent to Lead, Contact and Users and also by entering a number in “SMS Home”. 

SMS Template

SMS templates are like email templates and can be sent as text messages. A “Template Type” will need to specify the SMS template that can be created.


SMS History 

This object holds all text messaging records sent in Salesforce and is associated with relevant Lead or Account. 


Incoming SMS

The on-screen information displays the steps on screen as you do the following to set up actions for incoming messages. To an associate an incoming text with Lead or Account, configure “Incoming Lookup” within “SMS Messages” by creating a “New Incoming Lookup”. 


For Ex

If you have a list of “Phone” fields (Home Phone, Office Phone, Personal Mobile) on Account, a specific field needs to be configured, and based on that field value the incoming SMS will apply to the right record. 

For example, if you have “Personal Mobile” as a configured field, then the SMS received “Personal Mobile” value would be associated with the Account the phone number is linked to. 


Action on Incoming SMS

When an incoming SMS is sent to Salesforce, these records can be created:


  1. Lead
  2. Contact
  3. Opportunity
  4. Case
  5. Task


Click on “New Action on Incoming SMS” within “SMS Settings” to create a new action.



If a Lead or Account has unsubscribed from your text alerts, there is a setting for this.

If Salesforce receives a text containing the keyword “Unsubscription”, an automatic “Opt-Out” setting (“Opt-Out” field [Checkbox]) for the Lead or Account would be selected based on the mobile phone number it has come from.

 For Example

Stop and Unsubscribe are the keywords already setup for Lead to enable “Opt-Out”. If your Lead replies to an alert from Salesforce containing the words “Stop or Unsubscribe” then automatic opt-out will trigger.


Schedule a Text Alert

You can schedule text messages to be sent when a particular process complete at any time using “SMS on Workflow”.


  1. Go to “SMS on Workflow”
  2. Select [New SMS Workflow]
  3. Follow instructions


Send Text Using Apex API

Texts can be sent using Apex API. This type of message can also be scheduled and sent when certain criteria has been met. Use the following code:


List <smagicinteract__smsmagic__c>; 


smsObjectList = new List <smagicinteract__smsmagic__c>(); 


String senderId = ‘smsMagic’; 


String templateText = ‘test SMS by Screen Magic’; // you can fetch the template text by querying the record on smagicinteract__SMS_Template__c object 


smagicinteract__smsMagic__c smsObject = new smagicinteract__smsMagic__c(); 


smsObject.smagicinteract__SenderId__c = senderId; 


smsObject.smagicinteract__PhoneNumber__c = contact.MobilePhone; 


smsObject.smagicinteract__Name__c = contact.Name; // records name 


smsObject.smagicinteract__ObjectType__c = ‘Contact’; // record type 


smsObject.smagicinteract__disableSMSOnTrigger__c = 0; // this field either be 0 or 1, if you specify the value as 1 then sms will not get send but entry of sms will get create under SMS History object 


smsObject.smagicinteract__external_field__c = smagicinteract.ApexAPI.generateUniqueKey(); 


smsObject.smagicinteract__SMSText__c = templateText; 






If you need Salesforce Support or help with Customising your CRM, Purus can help. Get in touch with us today about Salesforce Services to get started!


We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.