Using Proxy with Flex A2P SMS

This guide is for Flex UI 1.x and channels that use Programmable Chat and Proxy. If you are using Flex UI 2.x or you are starting out, we recommend that you build with Flex Conversations.

If your contact center is sending SMS traffic in the United States, you're likely sending Application-to-Person SMS. As your contact center goes into production and scales its outbound traffic, you might notice that carriers are filtering some of your messages as potential spam. When your contact center gets to this point—or if you plan to send a high volume of outbound messages—it means that you'll need to:

  1. Register your SMS traffic with US carriers and
  2. Configure your contact center's messaging orchestration to use that registration.

This helps show that your messaging traffic is relevant to your customers and prevents it from being filtered by the US carrier network.

Carrier filtering is more of an art than a science. Work with your Twilio team to discuss your traffic and come up with a strategy for scaling your traffic. If you're just testing your contact center, however, you shouldn't have any issues. Feel free to return to this document when you're in production!

Key Concepts for A2P-10DLC in Flex

Phone Numbers/10DLC: A phone number in the US is also sometimes called a 10-digit long code (10DLC). If you plan to send traffic to your customers in the US, you'll need to register that Application-to-Person (A2P) traffic with the US Carriers.

Messaging Services: A messaging service is a software layer for Programmable SMS that contains a link to your A2P registration. It contains a pool of phone numbers that will all behave according to the messaging service's configuration.

Twilio Proxy: Twilio Proxy is another software product that your Flex Contact Center uses to orchestrate inbound messages and connect them to unique chat channels.

Register for an Application-to-Person use case

Your first step will be to register for an A2P use case. You can learn more about how to register and what you'll need for registration in the Direct Brand Onboarding documentation.

Associate your Phone Numbers with your A2P Registration

Typically, Flex messaging orchestration sends inbound messages directly to a software layer called Proxy, as described in the Flex Messaging overview. With A2P-10DLC, however, you first need to associate your phone numbers with your registration from the first step. You can do this using another handy piece of messaging software called a Messaging Service. The messaging service will associate your number with your A2P registration before sending traffic to your normal Flex messaging orchestration.

Create a Messaging Service via the Twilio Console

You'll need to navigate to the Messaging Services section of the Twilio Console to create a new messaging service. This will take you through four main steps:

1. In Step 1, choose a Friendly Name and use case that feel appropriate for you.

2. Add in any phone numbers that you want to use for messaging. This could be one phone number or many.

Screen Shot 2022-04-26 at 5.47.34 PM.png

3. Set your integration to Defer to Sender Webhook - this means that your phone number will keep using Flex messaging orchestration configuration, instead of using any of the messaging service logic. This step is the most important!

4. Click Complete Messaging Service Setup to finish setting up your new Messaging Service.

5. Optionally try the Send an SMS with a Messaging Service option to confirm your newly created Messaging Service is working. For more guidance, see the Messaging Service docs.

Create a Messaging Service via API

You can also create and update a Messaging Service via the API. In this method, make sure that you have the useInboundWebhookOnNumber property set to True.

Loading Code Sample...

        Set useInboundWebhookOnNumber to True

        Next Steps

        • Check out the A2P-10DLC support article for further information about A2P 10DLC, Application-to-Person messaging, and additional steps you may need to take to allow your SMS traffic in the US
        • Are you looking to register your customers' numbers for A2P traffic? Learn more about A2P 10DLC for ISVs
        • If you're looking to run Flex UI 2.x with Flex Conversations, please refer to the Conversations A2P Guide
        Rate this page:

        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 by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

        Thank you for your feedback!

        Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!