Velaro Routing and Rules Guide
> Routing Rules are now Legacy. Build new behaviour with Workflows — they handle every event Rules can handle, plus journey-style flows that span pre-chat → conversation → post-chat in a single canvas. Rules keep working forever, but Workflows take priority when both match an event. See workflows-guide.md for the recommended approach.
How Routing Works — The Full Stack
When a new conversation arrives, Velaro evaluates routing in this order:
- IVR pre-check (phone calls only) — if the dialed number has an explicitly assigned workflow that is enabled, use it. If disabled, fall through.
- Dynamic workflow lookup — all enabled
conversation_openedworkflows for the site are loaded, filtered by channel, sorted by Routing Priority (then by ID), and evaluated in order. First workflow whose conditions match wins and runs. - Automation rules (described below) — only evaluated if no workflow matched.
- Default team queue — if nothing else matches, the conversation goes to the site's default team.
Workflows always take priority over automation rules. Rules are the fallback layer.
When do rules run after a workflow?
Rules only run after a workflow finishes if the workflow did NOT explicitly route the conversation to a team. Specifically:
- Workflow ends with a Transfer to Team or Transfer to Agent node → rules never run, the explicit destination wins
- Workflow ends with a Transfer to AI (bot-only experience) → the "Stay with bot" toggle on the trigger node MUST be turned ON, otherwise the rules engine will run after the bot takes over and may assign a human agent on top of the bot conversation — which is almost never what you want
- Workflow ends with no routing node at all → rules run as normal fallback
The one rule every account should have:
Add a catch-all "Route to [Default Team]" rule with no conditions and the lowest priority (e.g. 999). This ensures that any conversation not matched by a workflow — and not matched by any other rule — still lands somewhere visible instead of disappearing into the default queue silently. New accounts get this rule by default and can remove it if they want fully workflow-driven routing.
What are rules?
Rules (also called automation rules) automatically route incoming conversations based on conditions you define. They run only when no workflow matched, or when a workflow finished without explicitly routing anywhere. Rules are simpler than workflows — they have no bot interaction, no data collection, and no node editor. They are configured under Settings → Routing Rules.
Creating a rule
- Go to Rules in the sidebar.
- Click New Rule.
- Select a trigger (what the rule does when it fires).
- Add one or more conditions (IF — when to fire).
- Set the rule priority (lower number = higher priority, runs first).
- Click Save and Activate.
Rule triggers (actions)
Each rule has exactly one trigger — what happens when the conditions match:
| Trigger | What it does |
|---|---|
| Use AI | Routes the conversation to an AI bot configuration |
| Use Prechat Survey | Shows a survey before the visitor starts chatting. Survey answers become variables for routing rules. |
| Use Postchat Survey | Shows a satisfaction survey after the chat ends |
| Use Unavailable Survey | Shows a survey when no agents are available |
| Route to Team | Assigns the conversation to a specific agent team |
| Set Conversation Priority (VIP Queue) | Flags conversations as High (1) or Urgent (2) priority — bypasses tier escalation |
| Resolve Chat | Automatically resolves inactive conversations after N minutes |
| Use Workflow on Conversation Resolve | Runs a workflow when a conversation is resolved |
| Use Workflow when Conversation is Unavailable | Runs a workflow when no agents are available |
| Create CRM Record | Creates a record in NetSuite or Dynamics 365 when a conversation starts |
| Determine Chat Window | Legacy trigger for selecting a chat window design. Superseded by Determine Experience Bundle (below) on accounts that have Chat Experience Bundles set up — only reached if the site has no bundles configured at all. |
| Determine Experience Bundle | Selects a named Chat Experience Bundle (chat window + persona + team + AI config, bundled together) for visitors matching this rule's conditions — e.g. an "accountTier = Enterprise" condition routing to a "VIP" bundle. The modern, recommended way to do segment-based chat window/team/persona selection. See workflows-guide.md → "Select Chat Window node" for the full 4-tier resolution order (workflow override > Experience Bundle > this legacy rule > account default). |
Rule conditions
You can match on any combination of:
- Channel: web chat, SMS, WhatsApp, Facebook, Instagram, Twitter/X, Email, RCS, IVR
- Chat Button: specific chat button (deployment) instance
- Time of day / day of week / date: business hours, after hours, weekends, specific dates
- Named Schedule: within a pre-defined shared work schedule
- Contact attribute: any custom field (e.g.
accountTier equals Enterprise) - URL / Domain: page the chat started on
- Survey answer: what the visitor selected in a prechat form (uses Attribute condition)
- Country / Language: visitor's detected location and language
- Tag: conversation or contact has a specific tag
- Team / Team Availability / Team Queue Depth: current team state
- Time Passed: how long since the conversation started
Multiple conditions in a rule are AND by default (all must match).
Routing groups to prechat survey vs. bot
The most common routing pattern is to route some visitor groups to a prechat survey (to collect info) and others directly to a bot or team. Use priority ordering:
Example:
- Rule priority 1: Channel = SMS → Use AI (bots handle all SMS; no prechat needed)
- Rule priority 2: Attribute
accountTier= Enterprise → Use Prechat Survey (VIP form before connecting) - Rule priority 3: Team Availability = Unavailable → Use AI (after-hours bot)
- Rule priority 4: (no conditions) → Route to Team — General Support (catch-all)
The first matching rule wins. Put your most specific rules first (low priority number) and the catch-all last (high number).
To combine prechat + bot:
- Create a
use-prechat-surveyrule for the group you want to survey. - The survey answers become Attribute variables (e.g.
topic,department). - Create downstream
use-aiorroute-to-teamrules that match on those survey answer variables.
Rule priority
Rules are evaluated in priority order (1 first). The first rule that matches wins — lower-priority rules are skipped.
Example order:
- Enterprise accounts → VIP Prechat Survey
- SMS channel → AI Bot (no survey)
- After hours → Bot Workflow
- French language → French Team
- Catch-all → General Support Team
Business hours routing
Use a Time condition to route differently during business hours:
- Condition: Day is Monday-Friday AND Time is 9:00-17:00
- Trigger: Route to Support Team
Pair with a second rule (no time condition) as the fallback:
- Trigger: Use AI (after-hours bot)
Or use a Named Schedule condition tied to a pre-built work schedule object to avoid specifying days/times manually.
Team tier escalation
If your plan includes Tier Escalation, you can define tiers within a team:
- Tier 1 agents get the conversation first
- If no Tier 1 agent accepts within N minutes, Tier 2 gets it
- And so on
Set up tiers in Teams > [Team Name] > Routing Tiers.
Routing modes
Queue mode: conversation waits in a queue until an agent accepts it. Agents see incoming conversations and click Accept.
AutoRoute mode: conversation is automatically assigned to the agent with the fewest active chats. No manual accept needed.
Set the routing mode per team under Teams > [Team Name] > Settings.
Auto-Resolve rules vs. Team Auto-Resolve settings
There are two separate controls for automatically resolving inactive conversations:
- Auto-Resolve rule (Rules page, trigger: "Resolve Chat") — site-wide, applies to conversations that match the rule's conditions.
- Team Auto-Resolve setting (Teams & Routing page) — applies to all conversations on a specific team.
Both run every minute. The shorter timer always fires first — the longer one is never reached because the conversation is already resolved. This is intentional (no double-resolution), but it causes confusion when the two settings disagree.
Example: Team "Support" Auto-Resolve = 30 min. Site-wide Resolve Chat rule = 40 min. The 30-min team setting fires first. The rule never triggers for Support team conversations.
Reverse example: Rule = 20 min, Team = 30 min. The 20-min rule fires first. The team setting is dormant — it will never trigger.
The Routing Rules page shows a conflict panel when competing settings exist, with a table showing exactly which timer wins. The Teams & Routing page shows an inline warning on the Auto-Resolve section — red "Overridden" badge when the rule fires first, amber warning when the team setting fires first and the rule is dormant.
Queue Timeout vs. Auto-Resolve — they don't conflict
- Queue Timeout — fires on unassigned conversations (waiting in queue with no agent). Marks them Missed. Set per team in Teams & Routing.
- Auto-Resolve — fires on assigned conversations where both sides go quiet. Marks them Resolved.
These target completely different conversation states. A conversation waiting in queue (unassigned) will never be touched by Auto-Resolve. They cannot conflict.
How to find and fix competing auto-resolve settings
- Go to Settings → Routing Rules
- Look for the amber conflict panel at the top of the page
- The table shows: rule timer, team timer, which one actually fires (bold/green), which is dormant (strikethrough)
- Click the rule link to edit it, or the team link to adjust the team setting
- Set both to the same value, or disable the dormant one
You can also see it inline: expand any team in Teams & Routing → enable Auto-Resolve → the status box shows whether a rule is competing.
Troubleshooting routing
Conversation not being routed: check that at least one rule matches and is Active. Check rule priority — a higher-priority rule may be routing it elsewhere.
Conversations resolving faster than expected: a site-wide Resolve Chat rule may have a shorter timer than the team setting. Check the conflict panel on the Routing Rules page.
Resolve Chat rule appears to have no effect: the team's Auto-Resolve setting may be shorter, firing first and leaving the rule dormant. Check Teams & Routing for an "Overridden" badge on the Auto-Resolve section.
All agents busy: if queue is full, consider adding a Use AI rule that activates when Team Queue Depth exceeds a threshold.
Wrong team getting the conversation: check rule priority order. The most specific rules should have the lowest priority number.
Prechat survey not showing: the use-prechat-survey rule fires only if no workflow matched first. If a workflow is active for the site, it takes priority and the prechat rule is skipped.
Was this article helpful?