If you've been here before, you might have read about the importance of choosing a text messaging service that works with keywords. This makes it easy for consumers to subscribe, unsubscribe, and get more information about your brand.

Keywords such as "info" and "help" can be used for a consumer to learn more about your brand. "Start," "stop," and similar keywords work as a way to opt in and out of your text messaging campaigns. This ensures you're following the law and providing good customer service.

However, you can also create a text message autoresponder on your own. This article will go into the three most important things to be aware of when creating one. We'll even provide you with an example code to get you on the right track.

Someone holding up a sign that says autoresponder on it in the city

1. What Is a Text Message Autoresponder?

An SMS autoresponder offers an automated way to send preselected messages to consumers. The information sent out varies based on what keywords are sent to your brand. One of the significant benefits of using an autoresponder for text is that customers do not need to wait on replies. They come immediately.

If someone wants more information, a Google Voice auto-reply or autoresponder text on an iPhone gives them answers quicker than it would be provided over chat, phone call, or through an Internet search. Plus, once you have a text autoresponder, it can offer coupons, promote sales, and much more.

Keyword Response Location Phone Number
Stop You replied using the word “stop,” which prevents you from getting any texts from this number. Text “start” if you would like to continue getting these messages. * *
Start You have sent a reply containing “start” and will once again be able to receive text messages from this number. * *
Info This is a demo of the text message autoresponder. * *
Info This is information about the test location. Test location *
Info This is information about +98765643210. * +9876543210
* This is an overall response. * *

You might wonder what keywords you should create for your text message autoresponder. It may be easiest to classify them into two categories: action responses and simple responses. Each keyword will do some action, but some are more powerful than others.

Keywords like "info" and "help" are considered simple keywords. However, "start" and "stop" are action keywords since they either opt in or opt out a consumer from a particular service while also sending out a response about it. We'll go deeper into that later on.

When creating a text message autoresponder, consider that keywords and responses can be paired based on particular situations. Instead of creating a user interface for single numbers or groups of numbers, a parameter like "location" or "phone number" might be the better option.

"Location" is used to group phone numbers logically. We'll share an example to help this make more sense. Let's say one company has a unique phone number for every use case. The "help" response needs to be different for each use case, but opting out can be the same for all of these cases.

Build Powerful SMS Campaigns

No contracts, no hidden fees, and no credit card information required to get started.

Create Account
a man in suit smiling as he looks down at his cellphone

2. Understanding Opt-In and Opt-Out Management

Keeping yourself in good standing with carriers requires you to give users the option to opt-in and out of your text messages. For toll-free text messages, "stop," "unstop," "arrest," "start," and "nonarret" are already built in as keywords. You do not need to acknowledge those who use these terms.

The traditional opt-out message that is sent back to a consumer as confirmation will provide information about how to opt back in and get more messages. However, you should ensure you handle the action that places the user on the opt-out list, so no future messages get to them. While the messages will be blocked, which makes you compliant, the message is still billable.

For other types of SMS, flexibility is available for handling opt-in and opt-out requests. You could choose terms like "end," "unsubscribe," and "resume." The keywords are yours to create, but so is the response you sent out to customers so you can make it focus more on your brand.

No matter the channel, your users should be educated on how to opt out in the initial message and, on occasion, after that. It might seem inconvenient to do this, but it's much better than removing numbers from a blocklist since users cannot or having your messages marked as spam.

Below is a sample application where "opt-in" and "opt-out" can be associated with any keyword you choose. If the keyword is sent in, the response will go out, and the phone number will be moved to or from the "opt-out" list.

The code is as follows:

def opt_out(service, sending_number, receiving_number)
opt_range = "'Opt Out'!A:B"
opt_value_range_object = Google::Apis::SheetsV4::ValueRange.new(majorDimension: 'ROWS', values: [[sending_number, receiving_number]])
opt_append = service.append_spreadsheet_value(SPREADSHEET_ID, opt_range, opt_value_range_object, value_input_option: 'RAW')

3. All about the Real-Time Message Log

Finally, we want to talk about creating a message log that accesses the inputs and outputs of the text message autoresponder as they happen. Message logs can be helpful for many things, such as getting analytics about how customers communicate with you and debugging your existing keywords.

There are several ways to retrieve information about your messages, depending on the services you utilize. However, most solutions don't keep the message content, so that needs to be done externally.

The callback, webhook events, and API requests can be used to build an external message log containing the message content. When sending a message, the content is stored from the message and the HTTP response. The latter will also have the ID of the message.

This event is the only spot where you can acquire the content of inbound messages. Having the message ID lets you correlate the message-failed, message-delivered callbook, or webhook received. All of this information will then be available when receiving a message.

The below sample is used on Google Sheets to store all this information:

def log_outbound_callback(callback, service)
row = find_id(callback["message"]["id"], service) + 2
type_range = "'Message Log'!G" + row.to_s
description_range = "'Message Log'!H" + row.to_s
error_range = "'Message Log'!I" + row.to_s
completed_range = "'Message Log'!K" + row.to_s
type_value_range_object = Google::Apis::SheetsV4::ValueRange.new(values: [[callback["type"]]])
description_value_range_object = Google::Apis::SheetsV4::ValueRange.new(values: [[callback["description"]]])
error_value_range_object = Google::Apis::SheetsV4::ValueRange.new(values: [[callback["errorCode"]]])
completed_value_range_object = Google::Apis::SheetsV4::ValueRange.new(values: [[callback["time"]]])
type_update = service.update_spreadsheet_value(SPREADSHEET_ID, type_range, type_value_range_object, value_input_option: 'RAW')
description_update = service.update_spreadsheet_value(SPREADSHEET_ID, description_range, description_value_range_object, value_input_option: 'RAW')
if !callback["errorCode"].nil?
error_update = service.update_spreadsheet_value(SPREADSHEET_ID, error_range, error_value_range_object, value_input_option: 'RAW')
completed_update = service.update_spreadsheet_value(SPREADSHEET_ID, completed_range, completed_value_range_object, value_input_option: 'RAW')

Auto Respond to Text Messages Using Esendex

You can create a text message autoresponder on your own. Esendex is here to help. We offer many excellent services, such as SMS APIs, SMS broadcasting, and phone number verification, and more. We can help you support any channel you use for your marketing. Get in touch today to learn more about which solutions are right for you.

An SMS broadcasting software displayed on a laptop screen
Become a Reseller

Our SMS reseller program gives you everything you need to easily resell our SMS software to your customers and increase revenue.

A cellphone that has text messages displayed on its screen that came from an sms api

Texting API designed to send & receive SMS & MMS globally using a short code or 10DLC number.

An SMS broadcasting software displayed on a laptop screen
SMS Software

Easy to use SMS software that can send & receive SMS & MMS using a short code or 10DLC number.

A phone with a headset sitting next to it
Voice API

Powerful voice API that sends mass automated phone calls quickly to mobile & landline devices.

A cellphone with a check on the screen and the words verified beneath the check
Verification API

Verify mobile & landline numbers, find service providers, & define time zones to restrict calling times.

people sitting at a table in a resturaunt and all of them are looking at their cellphones

What Is Mass Texting & How Does It Work?

Businesses can utilize SMS marketing in a number of ways, such as through a long code or short code. Short codes...

Read More
A man holding a phone in front of a laptop and both have marketing data displayed on their screen

What Is SMS Marketing & Why Use It?

SMS marketing is a term that's often thrown around when companies are talking about their communication...

Read More
A man pondering at a latop with a pen to his lip

SMS vs. MMS (What's the Difference)

Mobile phones have become a commodity. Today, people use cellular devices to connect with the world...

Read More