Copilot Best Practices

Overview

Twilio Copilot automatically solves the most common SMS problems. You simply set the configuration in the Console or by API. Copilot will pick the right phone number to send from and adapt your message content so it can successfully pass through ever-changing carrier specs.

While Copilot takes care of most of the complexity for you, here are a few best practices to keep in mind.

Send all of your SMS through a Messaging Service

The first Copilot best practice is… use Copilot! When sending SMS you can set the From parameter to a specific number or you can simply omit it and set the Messaging Service Sid. You need to use a messaging service to take advantage of Copilot features like Sticky Sender, Scaler, Geomatch, Shortcode Reroute, and Smart Encoding. We recommend always using a messaging service because it will give you access to these capabilities, along with any new ones we ship, without having to write any additional code.

Helpful Links:

Create and manage messaging service in the Console

Create and manage messaging services via API

Calculate how many phone numbers you need

Phone numbers are what you will typically use as the source of your message. Copilot automatically uses the best possible phone number from a messaging service when it sends a message. That means you need to add enough phone numbers to handle all your planned messaging.

There may be limitations for how you use phone numbers depending on the country. For example, in the US and Canada sending too many messages in a day from the same number puts you at risk of carriers filtering your messages. For application to person messaging, marketing traffic, and very high volume messaging, short codes are the way to go and help you avoid US/CA carrier restrictions.

If you plan to use phone numbers (i.e. long codes) there are a few things to consider:

1. How many people do you want to reach?

In the United States, it’s typically recommended that you add one long code number for every 200 unique recipients per day (because long codes are intended for person-to-person traffic). For example, if your SMS technical support number typically exchanges messages with 1,000 people a day, you should add 5 phone numbers to your Messaging Service.

2. How quickly do you want your messages sent?

The rate at which messages are allowed to be sent over a single phone number varies by country. In the US, it’s approximately 1 message per second. Outside of the US, it’s typically 10 messages per second. We’ve built a highly available distributed queue so you don’t have to worry about these limits. Your application can send us API requests as quickly as you’d like. We’ll queue your messages for you, and send them out at the appropriate rate. This keeps your application in compliance but can delay the delivery of your messages.

Adding phone numbers to your messaging service can increase your delivery rate. For example, 5 US phone numbers each sending at approximately 1 message per second can send about 5 messages per second together. These are approximate numbers as long code phone numbers don’t have a dedicated throughput. If you need dedicated throughput, you may want to look into using short codes, which can send at rates starting at 100 messages per second.

Use message queue insights to help determine when to add more numbers.

Guidelines vary by country. Check Twilio’s international SMS usage guidelines for the specific countries where you will be sending SMS.

Consider in-country phone numbers for messaging globally

In some countries, using a local familiar phone number can improve the read and response rate. You may want to add in-country numbers to your messaging service for each country you want to send SMS to. Copilot will automatically prioritize Short Codes and Alphanumeric Sender IDs when they are supported. Where they are not supported, Copilot will prioritize in-country phone numbers. If no appropriate short code, alphanumeric sender id, or in-country phone number can be found, Copilot will send from a US long code.

Helpful links:

International support for Alphanumeric Sender ID

What carriers are supported on Twilio short codes?

Add fewer than 400 phone numbers per messaging service

The maximum number of phone numbers per messaging service is 400. If you need to add more than 400 numbers, consider getting a short code. A single short code can send messages at rates starting at 100 messages per second and can go higher. Short codes have the added advantage of carrier pre-approval. This means they can send much higher volume per day without being subject to filtering in the same way that long code phone numbers are.

Messaging Services and CopilotAdd long codes to improve deliverability, even when using short codes

Short codes are broadly supported in the US, Canada, and the UK, but some smaller carriers may not support short code messages. To achieve the highest levels of deliverability you should add a few long codes to your messaging service. In the US and Canada, Copilot Reroute will send from a phone number when a short code is not supported.

Short codes can only be used to send domestic traffic (e.g. Canadian short codes can only send SMS in Canada.) In addition to using short codes, you should add long code numbers if you plan to send international SMS.

Consider adding an alphanumeric sender ID for one-way messaging in supported countries

Alphanumeric Sender ID lets you send branded one-way messages in 150+ countries. Copilot will automatically set the From parameter of your message to either your Alphanumeric Sender ID or a phone number depending on if Alpha sender ID is supported or not. Before you can use an Alphanumeric Sender ID with your Messaging Service, it must be enabled on your Account's SMS Settings.

Keep in mind that Alphanumeric Sender IDs cannot receive replies. Even if your use case is predominantly one-way, you may wish to use a phone number instead to enable your users to text back. Different countries have different regulations around how you use sender IDs. Some countries, like France, require any A2P traffic be sent via Alphanumeric. Other countries, like India, require Alphanumeric sender IDs to be pre-registered.

For each country where you want to send SMS to you should check Twilio’s international SMS usage guidelines as well as our list of international support for Alphanumeric Sender ID.

 

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.