Task-Worker Pairing Configs are used to configure the behavior of tasks in the CRM. A TWPC is used to define the rules for how tasks are assigned to agents (i.e., workers).
In order to configure a TWPC you need to understand the contents of task and worker objects. See the List Unterminated Task endpoint and the List Workers endpoint for more details.
List the task-worker pairing configs for a company.
Success
{- "status": 0,
- "count": 0,
- "data": [
- {
- "id": "string",
- "object": "string",
- "externalId": "string",
- "priority": 0,
- "name": "string",
- "companyId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "isDefault": true,
- "twilioWorkerQueueExpression": "string",
- "workerMatch": {
- "isManager": true,
- "teamIds": [
- "string"
], - "roleIds": [
- "string"
]
}, - "overrideTwilioWorkerQueueExpression": "string",
- "taskMatch": {
- "not": true,
- "taskTypes": [
- "answerInboundVoiceCall"
], - "case": {
- "caseTypeEnums": [
- "generic"
], - "autocreated": true,
- "caseTypeIds": [
- "string"
]
}, - "supercase": {
- "supercaseTypeEnums": [
- "generic"
]
}, - "interaction": {
- "channels": [
- "voice"
], - "themes": [
- "agentNotification"
], - "directions": [
- "outbound"
], - "subjects": [
- "annualPrivacyPolicyNotice"
]
}
}, - "twilioTaskWorkflowExpression": "string",
- "overrideTwilioTaskWorkflowExpression": "string"
}
]
}
Create a new task-worker pairing config.
Changes here will not take effect until synchronization is run. See: Sync task-worker pairing configs to Twilio
externalId | string or null |
priority | integer or null The order in which this pairing config should be evaluated. Higher numbers are evaluated first. Note that the default pairing config is always evaluated LAST (and it's |
name | string A human-readable name for this pairing config. |
object An object describing the characteristics of the workers to match to the tasks
matched in The settings here are translated into Twilio "expression syntax"[1] and matched against
the workers' attributes. You can see the generated expression in the field
[1] https://www.twilio.com/docs/taskrouter/expression-syntax | |
overrideTwilioWorkerQueueExpression | string If the characteristics of the workers you wish to match cannot be fully described by the
This field's syntax must conform to the Twilio "TaskRouter Expression" syntax[1]. Since this syntax is not validated here, it may be difficult to debug invalid
expressions; as such, it is recommended you use the [1] https://www.twilio.com/docs/taskrouter/expression-syntax |
object | |
overrideTwilioTaskWorkflowExpression | string If the characteristics of the tasks you wish to match cannot be fully described by the
This field's syntax must conform to the Twilio "TaskRouter Expression" syntax[1]. Since this syntax is not validated here, it may be difficult to debug invalid
expressions; as such, it is recommended you use the Some useful expression examples for TaskRouter task attributes:
[1] https://www.twilio.com/docs/taskrouter/expression-syntax |
Success
{- "externalId": "string",
- "priority": 0,
- "name": "string",
- "workerMatch": {
- "isManager": true,
- "teamIds": [
- "string"
], - "roleIds": [
- "string"
]
}, - "overrideTwilioWorkerQueueExpression": "string",
- "taskMatch": {
- "not": true,
- "taskTypes": [
- "answerInboundVoiceCall"
], - "case": {
- "caseTypeEnums": [
- "generic"
], - "autocreated": true,
- "caseTypeIds": [
- "string"
]
}, - "supercase": {
- "supercaseTypeEnums": [
- "generic"
]
}, - "interaction": {
- "channels": [
- "voice"
], - "themes": [
- "agentNotification"
], - "directions": [
- "outbound"
], - "subjects": [
- "annualPrivacyPolicyNotice"
]
}
}, - "overrideTwilioTaskWorkflowExpression": "string"
}
{- "status": 0,
- "message": "string",
- "data": {
- "id": "string",
- "object": "string",
- "externalId": "string",
- "priority": 0,
- "name": "string",
- "companyId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "isDefault": true,
- "twilioWorkerQueueExpression": "string",
- "workerMatch": {
- "isManager": true,
- "teamIds": [
- "string"
], - "roleIds": [
- "string"
]
}, - "overrideTwilioWorkerQueueExpression": "string",
- "taskMatch": {
- "not": true,
- "taskTypes": [
- "answerInboundVoiceCall"
], - "case": {
- "caseTypeEnums": [
- "generic"
], - "autocreated": true,
- "caseTypeIds": [
- "string"
]
}, - "supercase": {
- "supercaseTypeEnums": [
- "generic"
]
}, - "interaction": {
- "channels": [
- "voice"
], - "themes": [
- "agentNotification"
], - "directions": [
- "outbound"
], - "subjects": [
- "annualPrivacyPolicyNotice"
]
}
}, - "twilioTaskWorkflowExpression": "string",
- "overrideTwilioTaskWorkflowExpression": "string"
}
}
Perform synchronization of task-worker pairing config to Twilio.
API changes to task-worker pairing configs will have no effect until this synchronization is run.
Success
Success
{- "status": 0,
- "message": "string",
- "data": {
- "id": "string",
- "object": "string",
- "externalId": "string",
- "priority": 0,
- "name": "string",
- "companyId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "isDefault": true,
- "twilioWorkerQueueExpression": "string",
- "workerMatch": {
- "isManager": true,
- "teamIds": [
- "string"
], - "roleIds": [
- "string"
]
}, - "overrideTwilioWorkerQueueExpression": "string",
- "taskMatch": {
- "not": true,
- "taskTypes": [
- "answerInboundVoiceCall"
], - "case": {
- "caseTypeEnums": [
- "generic"
], - "autocreated": true,
- "caseTypeIds": [
- "string"
]
}, - "supercase": {
- "supercaseTypeEnums": [
- "generic"
]
}, - "interaction": {
- "channels": [
- "voice"
], - "themes": [
- "agentNotification"
], - "directions": [
- "outbound"
], - "subjects": [
- "annualPrivacyPolicyNotice"
]
}
}, - "twilioTaskWorkflowExpression": "string",
- "overrideTwilioTaskWorkflowExpression": "string"
}
}
Update a task-worker pairing config.
Changes here will not take effect until synchronization is run. See: Sync task-worker pairing configs to Twilio
externalId | string or null |
priority | integer or null The order in which this pairing config should be evaluated. Higher numbers are evaluated first. Note that the default pairing config is always evaluated LAST (and it's |
name | string A human-readable name for this pairing config. |
object An object describing the characteristics of the workers to match to the tasks
matched in The settings here are translated into Twilio "expression syntax"[1] and matched against
the workers' attributes. You can see the generated expression in the field
[1] https://www.twilio.com/docs/taskrouter/expression-syntax | |
overrideTwilioWorkerQueueExpression | string If the characteristics of the workers you wish to match cannot be fully described by the
This field's syntax must conform to the Twilio "TaskRouter Expression" syntax[1]. Since this syntax is not validated here, it may be difficult to debug invalid
expressions; as such, it is recommended you use the [1] https://www.twilio.com/docs/taskrouter/expression-syntax |
object | |
overrideTwilioTaskWorkflowExpression | string If the characteristics of the tasks you wish to match cannot be fully described by the
This field's syntax must conform to the Twilio "TaskRouter Expression" syntax[1]. Since this syntax is not validated here, it may be difficult to debug invalid
expressions; as such, it is recommended you use the Some useful expression examples for TaskRouter task attributes:
[1] https://www.twilio.com/docs/taskrouter/expression-syntax |
Success
{- "externalId": "string",
- "priority": 0,
- "name": "string",
- "workerMatch": {
- "isManager": true,
- "teamIds": [
- "string"
], - "roleIds": [
- "string"
]
}, - "overrideTwilioWorkerQueueExpression": "string",
- "taskMatch": {
- "not": true,
- "taskTypes": [
- "answerInboundVoiceCall"
], - "case": {
- "caseTypeEnums": [
- "generic"
], - "autocreated": true,
- "caseTypeIds": [
- "string"
]
}, - "supercase": {
- "supercaseTypeEnums": [
- "generic"
]
}, - "interaction": {
- "channels": [
- "voice"
], - "themes": [
- "agentNotification"
], - "directions": [
- "outbound"
], - "subjects": [
- "annualPrivacyPolicyNotice"
]
}
}, - "overrideTwilioTaskWorkflowExpression": "string"
}
{- "status": 0,
- "message": "string",
- "data": {
- "id": "string",
- "object": "string",
- "externalId": "string",
- "priority": 0,
- "name": "string",
- "companyId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "isDefault": true,
- "twilioWorkerQueueExpression": "string",
- "workerMatch": {
- "isManager": true,
- "teamIds": [
- "string"
], - "roleIds": [
- "string"
]
}, - "overrideTwilioWorkerQueueExpression": "string",
- "taskMatch": {
- "not": true,
- "taskTypes": [
- "answerInboundVoiceCall"
], - "case": {
- "caseTypeEnums": [
- "generic"
], - "autocreated": true,
- "caseTypeIds": [
- "string"
]
}, - "supercase": {
- "supercaseTypeEnums": [
- "generic"
]
}, - "interaction": {
- "channels": [
- "voice"
], - "themes": [
- "agentNotification"
], - "directions": [
- "outbound"
], - "subjects": [
- "annualPrivacyPolicyNotice"
]
}
}, - "twilioTaskWorkflowExpression": "string",
- "overrideTwilioTaskWorkflowExpression": "string"
}
}
Delete a task-worker pairing config.
Changes here will not take effect until synchronization is run. See: Sync task-worker pairing configs to Twilio
Delete ok