How can we help you?

How Routing Rule Conditions Work: Any, All, and Condition Groups

Overview

Routing rules decide which team (group) a visitor is assigned to when they start a chat, and whether the chat button appears at all. Each rule is built from one or more condition groups. Understanding how conditions and groups combine gives you precise control over who sees a chat button and where chats land.

Conditions Within a Group: Any vs. All

Every condition group has its own Conditions required setting:

  • Any - the group matches if at least one condition in it is true. Use this when you want to match multiple similar values, such as several page URLs or several countries.
  • All - the group matches only when every condition in it is true. Use this when all criteria must be met at the same time.

Example: You want to match visitors on any of three product pages. Put all three page-URL conditions in one group and set it to Any. The group matches if the visitor is on any one of those pages.

How Groups Combine: Always AND

When a rule has more than one condition group, the rule fires only when all groups match. Groups are always combined with AND logic - there is no way to OR two groups together.

This makes multi-group rules powerful. A common pattern is:

  • Group 1 (Any): Current page contains one of your target product paths
  • Group 2 (Any): Visitor country is one of your target regions

The rule fires only when the visitor is on one of those pages AND is in one of those countries. Either condition alone is not enough.

Example: Page + Country Rule

You want US and Canadian visitors on your Engine product pages to reach your Engine support team:

Group 1 - Page (Any):

  • Current page contains /en/products/engine
  • Current page contains /en/products/bulk-fluid

Group 2 - Country (Any):

  • Country = United States
  • Country = Canada

A visitor from Canada on the bulk-fluid page matches the rule. A visitor from France on the engine page does not.

Rule Priority: First Match Wins

Rules are evaluated from lowest priority number to highest. The first rule that matches is applied and evaluation stops. Put your most specific rules at lower priority numbers so they fire before broader catch-all rules.

Button Visibility: Hide When No Agents Are Available

Each team group has a Hide button when no agents are available setting. When this is on and no agents in the group are online, the chat button is automatically hidden for any visitor who would be routed to that group.

A useful pattern is a no-chat group:

  1. Create a group with no agents and the hide setting turned on.
  2. Add a catch-all routing rule at the end of your list (high priority number) pointing to that group.

The button disappears automatically on any page not covered by a more specific rule, without modifying the widget code on those pages.

When the hide setting is off, the button always shows and visitors receive a survey or offline message if no agents are available.

Troubleshooting: Button Shows on Unexpected Pages

  1. Look at your rule list sorted by priority and trace which rule fires first for that page URL and visitor country.
  2. Check the group that rule points to. If that group has hide-when-unavailable turned off, the button shows even when no agents are online.
  3. Confirm you have a catch-all rule at the end pointing to a group with hide-when-unavailable on and zero agents, so unmatched pages suppress the button automatically.

Troubleshooting: All Chats Going to One Group

If every chat lands in the same group, usually only one rule is matching. Check whether you have separate rules for each section of your site. A single rule covering only some pages captures all chats from those pages while other visitors either see no button or fall through to a catch-all. Create a separate routing rule for each product line or page category you want to route to a different team.


Note: In future versions of Velaro the condition builder may display visual indicators showing how conditions are grouped together, making it easier to see at a glance which conditions are ANDed and which are ORed. The underlying logic described in this article remains the same.

Was this article helpful?