Tasks are used to track work that needs to be done by agents in the CRM. Tasks are automatically assigned to agents based on configurable characteristics of the agents and the tasks.
Get information on task queues such as friendly name and task statistics.
Success
[- {
- "account_sid": "string",
- "assignment_activity_name": "string",
- "assignment_activity_sid": "string",
- "date_created": "2019-08-24T14:15:22Z",
- "date_updated": "2019-08-24T14:15:22Z",
- "friendly_name": "string",
- "max_reserved_workers": 0,
- "real_time_statistics": {
- "activity_statistics": [
- {
- "friendly_name": "string",
- "sid": "string",
- "workers": 0
}
], - "longest_relative_task_age_in_queue": 0,
- "longest_relative_task_sid_in_queue": "string",
- "longest_task_waiting_age": 0,
- "longest_task_waiting_sid": "string",
- "tasks_by_priority": { },
- "tasks_by_status": {
- "assigned": 0,
- "canceled": 0,
- "pending": 0,
- "reserved": 0,
- "wrapping": 0
}, - "total_available_workers": 0,
- "total_eligible_workers": 0,
- "total_tasks": 0
}, - "cumulative_statistics": {
- "avg_task_acceptance_time": 0,
- "end_time": "2019-08-24T14:15:22Z",
- "reservations_accepted": 0,
- "reservations_canceled": 0,
- "reservations_created": 0,
- "reservations_rejected": 0,
- "reservations_rescinded": 0,
- "reservations_timed_out": 0,
- "split_by_wait_time": {
- "5": {
- "above": {
- "tasks_canceled": 0,
- "reversations_accepted": 0
}, - "below": {
- "tasks_canceled": 0,
- "reversations_accepted": 0
}
}, - "10": {
- "above": {
- "tasks_canceled": 0,
- "reversations_accepted": 0
}, - "below": {
- "tasks_canceled": 0,
- "reversations_accepted": 0
}
}
}, - "start_time": "2019-08-24T14:15:22Z",
- "tasks_canceled": 0,
- "tasks_completed": 0,
- "tasks_deleted": 0,
- "tasks_entered": 0,
- "tasks_moved": 0,
- "wait_duration_in_queue_until_accepted": {
- "avg": 0,
- "max": 0,
- "min": 0,
- "total": 0
}, - "wait_duration_until_accepted": {
- "avg": 0,
- "max": 0,
- "min": 0,
- "total": 0
}, - "wait_duration_until_canceled": {
- "avg": 0,
- "max": 0,
- "min": 0,
- "total": 0
}
}, - "reservation_activity_name": "string",
- "reservation_activity_sid": "string",
- "sid": "string",
- "target_workers": "string",
- "task_order": "string",
- "workspace_sid": "string"
}
]
{- "availableByUserConfig": { }
}
{- "status": 0,
- "message": "string",
- "data": {
- "availableByUserConfig": { },
- "availableByDefault": { },
- "permitted": { }
}
}
List all Taskrouter Workers.
Note that this endpoint returns all Twilio workers up to 10,000—i.e., there is no paging. It may suffer from poor performance for large numbers of workers.
Success
{ }
Reads unterminated task from Twilio API. (This essentially proxies Twilio's Task API).
Note that paging works differently on this endpoint in order for compatibility
with the Twilio API—but you can still use nextUrl
and previousUrl
An "unterminated" task is an "active" task—or any task which has yet to have its
task assignment status set to completed
or canceled
. See: https://www.twilio.com/docs/taskrouter/lifecycle-task-state
include | Array of strings Fields to include in the response. If |
sortBy | Array of strings The data attributes by which to sort the results. |
taskQueueSid | string The SID of the TaskQueue with the Tasks to read. |
assignmentStatus | Array of strings The assignment status of the Note that the assignment status cannot be |
taskType | Array of strings (TaskType) Only display tasks matching any these task types |
caseType | Array of strings (BaseCaseType) Only display tasks with a case with a matching any of these case type |
caseId | Array of strings Only display tasks with a case ID which matches any of these case IDs |
supercaseId | Array of strings Only display tasks with a supercase ID which matches any of these supercase IDs |
interactionId | Array of strings Only display tasks with an interaction ID which matches any of these interaction IDs |
unableToComplete | boolean If |
taskAttrMatchExpr | string A Taskrouter expression to use for matching the task by task attributes. This field's syntax must conform to the Twilio "TaskRouter Expression" syntax[1]. [1] https://www.twilio.com/docs/taskrouter/expression-syntax |
hasCase | boolean Only display tasks which have a case associated with them. |
hasCaseOwner | boolean Only display tasks which has a case with an owner when the task was published. (Note that this filters based on the data in the task object, which represents the state of the case at the moment the task was published.) |
Success
{- "data": [
- {
- "account_sid": "string",
- "addons": "string",
- "age": 0,
- "assignment_status": "pending",
- "attributes": {
- "task_lifelong_id": "string",
- "task_init_at": "string",
- "task_type": "answerInboundVoiceCall",
- "to": "string",
- "from": "string",
- "called": "string",
- "caller": "string",
- "to_zip": "string",
- "to_city": "string",
- "call_sid": "string",
- "from_zip": "string",
- "to_state": "string",
- "direction": "string",
- "from_city": "string",
- "called_zip": "string",
- "caller_zip": "string",
- "from_state": "string",
- "to_country": "string",
- "account_sid": "string",
- "api_version": "string",
- "called_city": "string",
- "caller_city": "string",
- "called_state": "string",
- "caller_state": "string",
- "from_country": "string",
- "called_country": "string",
- "caller_country": "string",
- "borrower": {
- "loanTypes": [
- {
- "types": [
- null
], - "names": [
- "Foobar Installment Loan"
], - "ids": [
- "LT-AAAA-BBBB"
]
}
], - "name": "string",
- "id": "BO-AAAA-BBBB"
}, - "interaction": {
- "id": "string",
- "contactId": "string",
- "personId": "string",
- "startedAt": "2019-08-24T14:15:22Z",
- "scheduledAtFrom": "2019-08-24T14:15:22Z",
- "scheduledAtTo": "2019-08-24T14:15:22Z",
- "content": null,
- "channel": "string",
- "subject": "annualPrivacyPolicyNotice",
- "theme": "agentNotification",
- "borrowerSelectedTheme": "agentNotification",
- "status": "attempted",
- "statusDetails": "voiceSpokeWithFirstParty",
- "metaData": { },
- "previousInteractionSubject": "annualPrivacyPolicyNotice",
- "previousInteractionTheme": "agentNotification"
}, - "case": { }
}, - "date_created": "2019-08-24T14:15:22Z",
- "date_updated": "2019-08-24T14:15:22Z",
- "priority": 0,
- "reason": "string",
- "reservation": "string",
- "sid": "string",
- "task_channel_sid": "string",
- "task_channel_unique_name": "string",
- "task_queue_entered_date": "2019-08-24T14:15:22Z",
- "task_queue_friendly_name": "string",
- "task_queue_sid": "string",
- "timeout": 0,
- "workflow_friendly_name": "string",
- "workflow_sid": "string",
- "workspace_sid": "string"
}
]
}
Bulk delete unterminated tasks from Twilio API. (this proxy's Twilio's Task API).
An "unterminated" task is an "active" task—or any task which has yet to have its
task assignment status set to completed
or canceled
. See: https://www.twilio.com/docs/taskrouter/lifecycle-task-state
Success
{- "taskSids": [
- "string"
]
}
{- "status": 0,
- "message": "string"
}
Read's the specified unterminated task from Twilio API (this proxy's Twilio's Task API).
An "unterminated" task is an "active" task—or any task which has yet to have its
task assignment status set to completed
or canceled
. See: https://www.twilio.com/docs/taskrouter/lifecycle-task-state
Success
{- "data": {
- "account_sid": "string",
- "addons": "string",
- "age": 0,
- "assignment_status": "pending",
- "attributes": {
- "task_lifelong_id": "string",
- "task_init_at": "string",
- "task_type": "answerInboundVoiceCall",
- "to": "string",
- "from": "string",
- "called": "string",
- "caller": "string",
- "to_zip": "string",
- "to_city": "string",
- "call_sid": "string",
- "from_zip": "string",
- "to_state": "string",
- "direction": "string",
- "from_city": "string",
- "called_zip": "string",
- "caller_zip": "string",
- "from_state": "string",
- "to_country": "string",
- "account_sid": "string",
- "api_version": "string",
- "called_city": "string",
- "caller_city": "string",
- "called_state": "string",
- "caller_state": "string",
- "from_country": "string",
- "called_country": "string",
- "caller_country": "string",
- "borrower": {
- "loanTypes": [
- {
- "types": [
- "installment"
], - "names": [
- "Foobar Installment Loan"
], - "ids": [
- "LT-AAAA-BBBB"
]
}
], - "name": "string",
- "id": "BO-AAAA-BBBB"
}, - "interaction": {
- "id": "string",
- "contactId": "string",
- "personId": "string",
- "startedAt": "2019-08-24T14:15:22Z",
- "scheduledAtFrom": "2019-08-24T14:15:22Z",
- "scheduledAtTo": "2019-08-24T14:15:22Z",
- "content": null,
- "channel": "string",
- "subject": "annualPrivacyPolicyNotice",
- "theme": "agentNotification",
- "borrowerSelectedTheme": "agentNotification",
- "status": "attempted",
- "statusDetails": "voiceSpokeWithFirstParty",
- "metaData": { },
- "previousInteractionSubject": "annualPrivacyPolicyNotice",
- "previousInteractionTheme": "agentNotification"
}, - "case": { }
}, - "date_created": "2019-08-24T14:15:22Z",
- "date_updated": "2019-08-24T14:15:22Z",
- "priority": 0,
- "reason": "string",
- "reservation": "string",
- "sid": "string",
- "task_channel_sid": "string",
- "task_channel_unique_name": "string",
- "task_queue_entered_date": "2019-08-24T14:15:22Z",
- "task_queue_friendly_name": "string",
- "task_queue_sid": "string",
- "timeout": 0,
- "workflow_friendly_name": "string",
- "workflow_sid": "string",
- "workspace_sid": "string"
}
}
Delete the unterminated task from Twilio API (this proxy's Twilio's Task API).
The deleted task immediately has its assignment status transition to canceled
.
This also generates the Twilio event task.deleted
.
An "unterminated" task is an "active" task—or any task which has yet to have its
task assignment status set to completed
or canceled
. See: https://www.twilio.com/docs/taskrouter/lifecycle-task-state
Success
{- "status": 0,
- "message": "string"
}
Abandon an unterminated, accepted task. i.e., Mark the task as "Unable to Complete" and create a duplicate task.
An "unterminated" task is an "active" task—or any task which has yet to have its
task assignment status set to completed
or canceled
. See: https://www.twilio.com/docs/taskrouter/lifecycle-task-state
Success
Failed to abandon task
Request sandbox access