Twilio Notes

Professional Services Templates

Capturing task events in event (not action)

https://twilio.github.io/twilio-taskrouter.js/Task.html#event:completed__anchor

task.on('wrapup', ()=>{});

task.on('completed', ()=>{});

 

Task list filter by workflow name:
note: workflowName first letter must be lowercase
note: cannot paginate

client.taskrouter.v1.workspaces('WORKSPACE_SID_HERE')
.tasks
.list({
   workflowName: `WORKFLOW_NAME_HERE`,
   limit: 20
})
.then(tasks => tasks.forEach(t => console.log(t.sid + " " + t.workflowFriendlyName)));

Paginate chat channels:

currentPage = await client.chat.v2
            .services(chatChannelServiceId)
            .channels
            .page({ pageSize: page_size });

Twilio REST API concurrency limit: 100 per second base on this stackoverflow post

Monitor your usage

Making outbound call from Twilio Flex (click to dial)

https://www.twilio.com/docs/flex/developer/voice/dialpad-click-to-dial

Asyn loop in studio flow while putting caller in hold conference – may use in a callback queue

New York Times headlines instead of hold music

Hold Time Metrics – Flex Insights Report

Flex UI action list

Edge location list

Twilio API explorer postman collection