If you haven't purchased an SMS-enabled phone number yet, refer to Purchase a new Twilio Phone Number.
The default way to route incoming SMS messages for a phone number into Flex is to:
- point the phone number to a Proxy Service
- map it using a Flex Flow
- set the Flex Flow to use a Studio Flow, and
- make sure the Studio Flow invokes the Send to Flex widget
Under the hood, Flex uses Twilio Proxy to manage messaging sessions. The Flex Proxy Service uses the Flex Flows configuration to route incoming messages to the phone numbers associated with your Flex account.
To configure a new phone number to point to Flex Proxy Service:
- In the Twilio Console, navigate to Manage Numbers > Active Numbers.
- Click on the newly purchased number.
- Scroll down to Messaging.
- Keep the default selection for the "Configure With" field to "Webhooks, TwiML Bins, Functions, Studio, or Proxy".
- Under "A Message Comes In”, select "Proxy Service", then "Flex Proxy Service".
- Click Save.
Flex Flows describe the way a contact identity should handle inbound messages. To add a Flex Flow for your new phone number, navigate to Flex > Messaging. The new number should be in the "Unregistered Numbers" list. Click "Register".
This will assign the default Studio Flow for messaging(called “Messaging Flow” by default) to your new phone number.
The phone number that came with your Flex instance is configured with the same Studio Flow. By default, this Studio Flow invokes the Send To Flex widget to route incoming SMS messages to Flex. To learn about other integration types for handling inbound messages, see Manage Flex Flows.
Text the phone number that you purchased. Follow the steps in Respond to SMS to review the incoming SMS task on your Flex instance.