Overview
Routing Rules allow you to determine the logic for which tasks should be assigned to which agents and in what priority order.
Routing Rules are organized by: Incoming Calls, Inbound SMS, and Outbound Calls (including those triggered by Journeys/Campaigns, Scheduled Callbacks and ASAP Callbacks).
For example, when an Outbound Call task is created, it will be sent to the Outbound Call routing rules and follow the steps you set up.
Clicking into the Routing Rules for Outbound Calls looks like this:
Example Routing Rules for Outbound Call
Routing Rules are evaluated in order from top to bottom. Rules can be dragged and dropped to rearrange them. Rules are also able to be renamed.
Configuring Routing Rules & Settings
Settings
- Reservation Timeout is the amount of time a task will be reserved for an agent after a match is found. After the timeout expires, the reservation will be revoked from the agent and the task will attempt to find a new matching agent. The task will continue looking for a match at its current Routing Rule; it does not start from the top of the workflow.
- Default Queue is the queue that a task will be assigned to if a matching agent isn't found through any of the Routing Rules. If no default queue is set for a routing rule set, the task will be created but will not be assigned unless it's updated and goes through the routing rule set again.
Rules
Clicking into the ASAP Callbacks rule looks like this:
Example Routing Rule
Expressions referenced in Routing Rules are written using a basic query language syntax.
- Strings can be referenced with either single or double quotes ("Regal" and 'Regal' are both valid).
- Numbers can be referenced as integers or floats (1, 1.0, 1.05 are all valid).
- Booleans (true and false) are able to be referenced in expressions.
Values can be compared using basic comparators.
Comparator | Expression | Example Syntax |
Equals | == | task.taskTitle == "Scheduled Callback" |
Does not equal | != | task.campaignID != 4 |
Has | HAS | worker.routing.skills HAS "Outbound Call" |
In | IN | "Outbound Call" IN worker.routing.skills |
Not In | NOT IN | "Trainee" NOT IN worker.routing.skills |
Task Conditions
If a task causes a rule's Task Condition to evaluate to True, the task will be assigned to an agent using that rule's routing steps. Routing rules are evaluated from top to bottom, so it's the first Task Condition that evaluates to True that is the one that will be used for that Task.
The task condition checks against the attributes of a task. For example all ASAP Callback tasks have a task attribute of "title": "ASAP Callback", so this condition will evaluate to True for ASAP Callback tasks, but FALSE for all other kinds of tasks e.g., Scheduled Callbacks (because they have "title": "Scheduled Callback").
Task Condition matching ASAP Callback tasks
Example Task Conditions
Task Condition Syntax | Explanation |
title == "ASAP Callback" | Identifies all ASAP Callback tasks. |
campaignInfo.friendly_id == '99' | Identifies tasks generated from Campaign ID 99. |
regalVoicePhone IN ['+13305551234'] | Identifies all tasks associated with the Regal Phone number +13305551234. |
Routing Steps
After using the Task Condition to find matching tasks, the task is assigned to an agent using the rule's Routing Steps.
A Queue must be selected first to route the task to. A queue is a "parking lot" for tasks (and agents are assigned to queues through queue expressions based on their skills, teams or other means you determine. See article for how to manage and create task queues.)
After selecting a queue, select the Qualifying Agents. There are three options here:
- All Agents: When selected, this option is used to route the task to any agent in the selected queue.
- Specific Agent in Queue: When selected, this option is used to route the task to a specific agent based on a task attribute. For example, you can route an Inbound Email task to the contact owner by mapping the owner contact attribute to the task attribute targetAgentEmail. Then in the Agent Attribute field, select targetAgentEmail.
- Advance Agent Expression: When selected, this option is used to route the task according to custom conditions. Regal will cycle through every agent in the selected queue until a match is found for the agent expression.
When routing a task to a specific agent or using an agent expression, it's best practice to create a fallback rule underneath the customized rule. This ensures that if no agents match the configured agent attribute or expression, the task is routed to the appropriate queue.
In the below example, the task is being sent to the "Callbacks" queue and served to the targetWorker agent associated with the contact.
Example Routing Step
Incoming & Transfer Call Notification
For the Incoming Call and Transfer rules only, you'll see an additional checkbox above the Skip Step Timeout setting. When enabled, this feature allows agents to receive reservations for incoming or transfer calls matching that rule even while they are handling an active call task. They can then decide to stay on their current call or drop it in favor of a higher priority incoming or transfer call. To view the agent experience, watch the demo.
Note: This feature should NOT be used alongside Auto-accept for incoming calls, as agents will be automatically kicked off their existing calls as soon as an incoming call task is reserved to them.
Step Timeout
Step Timeout is the amount of time (in seconds) a task will wait for an agent in that Routing Step before moving to the next Routing Step or Routing Rule.
workflow_timeout
. It will not move to the next Routing Rule.
Skip Step Timeout
If an agent isn't immediately available to be assigned a task, the Step Timeout can be skipped so that the task proceeds immediately to the next Routing Step or Routing Rule.
A Timeout Expression must be provided if the Step Timeout should be skipped. If the expression evaluates to True the Step Timeout will be skipped.
A simple way of ensuring that the Step Timeout will always be skipped if appropriate is setting the Timeout Expression to 1 == 1.
Priority
Tasks will be assigned to agents based on their Priority set through Routing Steps. Priority must be a positive integer. If no priority is set, the task will inherit priority from the previous Routing Step or Routing Rule. Higher priority tasks will be assigned to agents first.
Tasks that enter a routing rule are locked into that particular rule configuration for the task's lifetime. Changes made to routing rules will only apply to newly created tasks.
Additionally, tasks evaluate against routing rules from top to bottom once when they are first created, and then only there after when a task attribute of the task is updated.