How to Build a Text Message Autoresponder and Use It for Sales?

Topic: Esendex, Uncategorized

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.

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.

KeywordResponseLocationPhone Number
StopYou 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.**
StartYou have sent a reply containing “start” and will once again be able to receive text messages from this number.**
InfoThis is a demo of the text message autoresponder.**
InfoThis is information about the test location.Test location*
InfoThis 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.

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’)
end

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’)
end
completed_update = service.update_spreadsheet_value(SPREADSHEET_ID, completed_range, completed_value_range_object, value_input_option: ‘RAW’)
end

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 APIsSMS 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.

Author Avatar
Esendex US