How to Customize Phone Call Workflows with Twilio Studio and TaskRouter
With Twilio Studio and TaskRouter you can quickly customized call flows. This post will walk you through the steps to receive calls on your Twilio phone number and have the callers put into a call queue. The callers will listen to music while the application arranges an agent to take their call. Agents will use their web browser, on their computer, to manage their status: offline and available to accept calls.
When a caller is added into the queue, TaskRouter creates a reservation and then asks an agent if they will accept the call. The agent has the option to
Acceptand be connected with the caller, or to
Rejectthe call. If the call is rejected, TaskRouter will ask the next available agent.
When the agent accepts the call, TaskRouter will contact the agent based on the agent’s TaskRouter configuration. For example TaskRouter maybe configured to dial the ...
Twilio Studio makes it easy to manage voice call flows with its visual user interface. A Studio flow typically starts with a trigger event such as an incoming call to your Twilio phone number. The tutorial Forward Call with Studio has an Incoming Call as the trigger followed by a Connect Call To (forward_call) widget that forwards the call to a person’s phone number (see following screen print). The above flow, adds logic in between the trigger and the forward_call widget. This article is how to add logic using a Studio Run Function widget to call a Twilio Function, followed by a Split widget.
Building logic into the flow gives Studio more power to route calls to various destinations. The example here, is to choose between routing a call to the main office phone during business hours, or to voicemail after business hours.
In the my example flow, Business_hours ...
How to Receive SMS Messages into Google Sheets with Apps Script and Twilio
You want to receive SMS messages for business or for personal reasons, but not on your day-to-day mobile phone. Twilio has phone numbers which make it simple to receive SMS and we can easily place the messages into a Google Sheet.
Go to the Twilio Console, sign into your existing account or create a new account. Obtain a Twilio phone number or use an existing number. As a quick test, send a message from your mobile phone to your new phone number. On your mobile phone, you receive an automatic reply message from Twilio. You go to the Twilio Console SMS logs and view the message.
You can receive messages separate from your mobile phone, success! However, then you realize that the Console is functional for testing, but not practical for quickly searching and sorting the messages you’ve received.
How do we read the messages in a ...
How To Use Twilio Test Credentials with Magic Phone Numbers
Test credentials and magic phone numbers are used to test applications without actually sending SMS messages or making actual voice phone calls. These tools save time and money because you’re not charged for testing and responses are quicker as the tests only communicate with Twilio service, i.e. tests stay within Twilio services, no connections are made to carriers.
To follow along, if you are using UNIX or a Mac computer, use cURL to send SMS messages. If you are using Windows, you will need to write a program as outlined in our Send SMS Messages documentation. Here is the cURL command from the documentation:
curl -X POST 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages.json' —data-urlencode 'To=+16501231234' —data-urlencode 'From=+16502223333' —data-urlencode 'Body=Hello there' -u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
16501231234with your mobile phone number, and replace
16502223333with your Twilio phone number. Replace ...