Using Chat and TaskRouter together | Appendix | Web Sequence Diagrams
If you want to customize any of the flows described here for your own use, you can paste the below descriptions into websequencediagrams.com and edit from there.
1title Chat with TaskRouter23Customer->+App: Customer starts chat session in UI4App->Twilio: Chat channel is created5App->-Twilio: Task is created in Taskrouter6note right of App: Chat information is \n stored in task attributes7note right of Twilio: Taskrouter searches for available agent8Agent->+Twilio: Agent comes online9alt If Using SDK10Twilio->Agent: Task is assigned to agent11else If using assignment callbacks12Twilio-->-App: Task is assigned to agent13end14Agent->Twilio: Agent joins chat channel15note over Agent, Customer: Agent & Customer chat16Customer->+App: Customer ends chat in UI17App->+Twilio: Task marked complete18Twilio->Agent: Agent marked as available19App->Twilio: Chat channel closed20Twilio->App: Chat session ended21Twilio->-App: store chat transcript in CRM