Rate this page:

Using Email and TaskRouter Together

You can easily add Email as a channel to your contact center, by combining a REST based third party email service with TaskRouter. You may also want to use Twilio Chat to provide threading for multi-email conversations. This will use the following products:

- Programmable Chat - for the container of the overall conversation, and for easily updating/rendering the conversation inside the agent UI.

- TaskRouter - for routing each SMS conversation to the best agent.

- Email - we recommend a REST based email API service like SendGrid. However any email platform can be used as long as you have the ability to create a Task when an email arrives. Twilio customers have built this with tools such as Office 365 or Front as well.

This page outlines the best practice of how to use these products together for this Contact Center use case.

Note also that if you are also building webchat or SMS as a channel for your customers, most of the agent work done for these channels is applicable to Email (or vice versa).

Orchestrating Email and TaskRouter

The flow diagram below shows our recommended way of using Email and TaskRouter together.

Note that the chat room should be created first, before the task. This is because other wise in times of low traffic the task might be assigned to an agent before the chat room has been created. Once the chat room is created, it can be associated with the new task as an attribute.

2-way Email with TaskRouter

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 Community Forums or browsing the Twilio tag on Stack Overflow.


        Thank you for your feedback!

        We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

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

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        Step 1

        Get link

        Get a free personal referral link here

        Step 2

        Give $10

        Your user signs up and upgrade using link

        Step 3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more