Marketers / Marketing Cloud

Add SMS Opt-Out Option to Marketing Cloud MobileConnect

By Ananya Agrawal

You are probably very familiar with seeing an unsubscribe link in emails – it allows the end user to control their preferences and opt-out of receiving emails from a marketer. Alongside email marketing, there is also a rise in text-based marketing. But in the same way as email, you need to ensure you are providing the end user with the option to opt-out of text communications.  

Digital marketers know that emails need to be compliant with the CAN-SPAM Act. Similarly, while sending SMS messages, marketers need to provide users with a way to opt-out. So let’s take a look into the SMS-way-of-doing-things and see how we can provide an unsubscribe option using Salesforce Marketing Cloud’s MobileConnect.

How to Add SMS Opt-Out to Marketing Cloud

1. Purchase the code

First, you need to purchase a short or long code via which we can send out SMS marketing messages. The code is the number which recipients will see that the message is from.

  • Short codes: A 5 or 6-digit code. Good for text blasts and mass text messaging campaigns.
  • Long codes: A regular 10-digit number. Messages feel as though they are coming from a person rather than a bot.

While sending the SMS to end users, you have an option to display the ‘from’ name as the short/long code, or define a custom name which is in sync with your branding – most people opt for a custom name.

2. Associate keywords

Next, we need to associate different keywords to the short/long code. 

One of the keyword categories should be ‘STOP keywords’. These represent a text message that an end user can send/reply to you which notifies the marketing cloud system that this user wants to opt-out of receiving future SMS. By default the ‘STOP keywords’ is STOP but you can define your own keywords and add them too. 

All keywords can be defined by navigating to the admin page of Marketing Cloud MobileConnect and clicking on the short/long code.

3. The ‘STOP keywords’ and the ‘from’ name

In step 1, I mentioned that you can customize the ‘from’ name to align with your company’s brand. However, if you do so, to use the keyword functionality you have to modify the footer in the SMS. This is to provide end users with a way to opt-out as the standard functionality of ‘reply STOP’ will not work. 

Below is a sample SMS footer if you are using a custom ‘from’ name and STOP as the keyword.

Here you need to mention your short/long code so users can directly message the number to opt-out.

4. Automated reply setup

Lastly, it’s essential that you set up an automated reply to users who have requested to be opted out using the mentioned keyword in your SMS . It will help them get confirmation that they have been opted out. For example:

You can set up the custom response by clicking on the individual STOP keyword in Marketing Cloud MobileConnect (they don’t look like they are clickable but they are).

Note: For users receiving marketing SMS, it’s advised not to reply to unknown senders to unsubscribe. Blocking the sender will be a safer option.


It’s essential to give your recipients a way to opt-out of your marketing communications – including SMS messages. Using these four steps, you will now be able to achieve this in Marketing Cloud MobileConnect and stay compliant.

The Author

Ananya Agrawal

Ananya is a Marketing Cloud and Account Engagement Consultant. She is 8x Salesforce Certified and also Red Hat Certified.

Leave a Reply

24th - 27th November


50% off

all courses