Task Scenarios
Task scenarios can be used to control the logic of how tasks queued via the Queue Task method of the Task Routing API are routed and processed in your contact center. For example, you can use task scenarios to:
- Route tasks based on business hours, such as sending tasks to an outsourcing partner during off-peak times.
- Expand the pool of qualified agents or move a task to another queue if wait time or queue length is over a certain threshold.
- Change a task's priority to alter its position in the queue.
To create or edit task scenarios, open the Task page from the Scenarios sub-menu. You will see a list of Task scenarios that have already been configured. The Scenario Overview page describes how to create, edit, import, and export scenarios.
Task Scenario Lifecycle
The task scenario lifecycle starts when a task is queued via the API and associated with a Task Scenario Entry that specifies a task scenario. The task appears in the relevant service queue and awaits scenario execution. While awaiting scenario execution, tasks in services with the "Push" distribution method will not be distributed to agents automatically until the scenario exits or processes a Find Agent block. However, agents can move tasks into their personal queue at any time if the service uses the "Pull" distribution method, or if they have the privilege to see the contents of the push queue.
Once a task scenario begins execution, each scenario block is processed in order without pausing until a Find Agent or Wait+ block is encountered:
- When the scenario processes a Find Agent block, the behavior depends on its configuration and the task's current queue:
- If the task is in a service queue, its routing parameters are updated, and it can be pushed to agents if the service uses push routing.
- If the block has no escalation intervals (i.e., no timeout exit), the scenario concludes, and the task remains in its current queue.
- If the block has at least one escalation interval defined, the scenario pauses until the escalation timeout expires:
- When a non-final escalation interval expires, the settings for the next interval are applied if the task is in the service queue. If it is in a personal queue, the task is unchanged, and the next interval begins.
- If the final escalation interval expires (e.g. has a defined end time), the scenario resumes execution along the Timeout exit path.
- When a non-final escalation interval expires, the settings for the next interval are applied if the task is in the service queue. If it is in a personal queue, the task is unchanged, and the next interval begins.
- If the task is in a service queue, its routing parameters are updated, and it can be pushed to agents if the service uses push routing.
- If the scenario encounters a Wait+ block, it pauses until the specified condition is met. Service and priority values from any preceding Set Service or Set Priority blocks are preserved.
As with workflows, there is a limit on the maximum number of blocks that can be executed by a scenario, to prevent infinite loops. When the block execution limit is reached, an error is logged, the scenario is stopped, and the task remains in the queue in its current state. However, this block execution limit is reset each time a scenario is paused.
Properties Tab
Name
The name used to identify the scenario when associating it with a Task Scenario Entry.
Scenario Entries tab
Table of Task Scenario Entries
The top table displays a list of all Task Scenario Entries that point to this Task Scenario.
Selected Scenario Entry Properties
Displays an editable view of the specific Task Scenario Entry selected from the list of associated scenario entries. A Task Scenario is initiated when a task is created via an API call that includes the matching unique identifier of a Task Scenario Entry.
You can also define a new scenario entry for this scenario by clicking the + button.
Associations tab
Associations lists contact resources that are referenced in this scenario, such as skills and services. This may be useful, for example, when you use the same scenarios in several separate environments.