---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/taskrouter/contact-center-blueprint/sms-taskrouter-web-sequence-diagrams#article
headline: Using SMS and TaskRouter Together | Web Sequence Diagrams
description: Web sequence diagram source for using SMS and TaskRouter together in a contact center. Copy the diagram code into websequencediagrams.com to customize the flow.
url: https://www.twilio.com/docs/taskrouter/contact-center-blueprint/sms-taskrouter-web-sequence-diagrams
inLanguage: en
dateModified: 2026-07-20T14:57:47.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# Using SMS and TaskRouter Together | Web Sequence Diagrams

This page contains the web sequence diagram source for the SMS and TaskRouter flow. To customize the flow for your own use, paste the descriptions below into websequencediagrams.com and edit from there.

```text title="2-way SMS with TaskRouter sequence diagram"
title 2-way SMS with TaskRouter

Customer->+App: Customer sends text
App->Twilio: Look for open tasks from this sender
alt New Conversation
    App->Twilio: Create New Chat Channel
    App->Twilio: Add Customer # to Channel
    App->Twilio: Create Task w/ Channel id \nas attribute
    note over Twilio, Agent:
        TaskRouter searches
        for available agent
    end note
    Twilio->+Agent: Reservation Request
    Agent->Twilio: Accept and Join Chat Channel
else Existing Conversation
    Twilio->App: Return task, extract chat \nchannel from attribute
    App->Twilio: Push Message into Channel
    Twilio->Agent: MessageAdded
end
note left of Agent: Agent Replies
Agent->Twilio: add message to channel
Twilio->App: messaged added
note over App:
    If message added by agent
    pull contents of message
end note
App->Customer: send text reply
note over Customer, Agent: Customer or Agent Ends Conversation
App<->Twilio: Store Chat transcript in CRM
App->Twilio: Close Chat Channel
App->Twilio: Move task to wrapup
Agent->Twilio: Move task to complete
```
