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.
_21title Chat with TaskRouter_21_21Customer->+App: Customer starts chat session in UI_21App->Twilio: Chat channel is created_21App->-Twilio: Task is created in Taskrouter_21note right of App: Chat information is \n stored in task attributes_21note right of Twilio: Taskrouter searches for available agent_21Agent->+Twilio: Agent comes online_21alt If Using SDK_21Twilio->Agent: Task is assigned to agent_21else If using assignment callbacks_21Twilio-->-App: Task is assigned to agent_21end_21Agent->Twilio: Agent joins chat channel_21note over Agent, Customer: Agent & Customer chat_21Customer->+App: Customer ends chat in UI_21App->+Twilio: Task marked complete_21Twilio->Agent: Agent marked as available_21App->Twilio: Chat channel closed_21Twilio->App: Chat session ended_21Twilio->-App: store chat transcript in CRM