# Create queue rules

> Queue rules allow you to determine how inbound conversations and tasks are assigned to a queue using customer, conversation, or company data.

Source: https://help.kustomer.com/en_us/queue-rules-HyLuJ1KHX

Last updated: 2026-06-11T19:08:33.001Z

Queue rules allow you to determine how inbound conversations and [tasks](https://help.kustomer.com/route-a-task-SyrHSSC2A) are assigned to a queue using customer, conversation, or company data. For example, you can create rules that assign conversations to queues based on the channel they came through, the native language of the customer contacting you, their company name, or the support area requested, such as the returns department. 

Additionally, you can [create skill rules](https://help.kustomer.com/assign-conversation-based-on-skill-S1QJ_UykA) that route conversations directly to agents with specific expertise, ensuring the best agent handles the inquiry. 

Once in a queue, the conversation or task is routed to an available agent.

**Who can access this feature?**

**User types**

Admins can access the Routing page.

  

### In this article

*   [Understand rule conditions](#understand)
*   [Create a queue rule](#create)
*   [Assign a rule to a queue](#assign)
*   [Set the order of queue rules](#set)
*   [Turn on queue rules](#activate)

### Understand rule conditions

Queue rules use a set of conditions, or criteria, to determine how conversations and tasks are assigned to a queue. To ensure a they are placed in the correct queue, queue rules should be as specific as possible.

There are two types of conditions – _all_ conditions and _any_ conditions. Conditions set under "Match all of the following" must all be true for a queue rule to run. Conditions set under "Match any of the following" will run if an incoming conversation matches at least one of the conditions specified.

For example, you may want to route chat conversations for returns to a specific “Returns” queue and not your Chat queue. To do so, you can use **Conversation Channel Is Equal To Chat** and **Message Subject Contains Return**.

![](https://cdn.kustomerhostedcontent.com/media/570fad9d9001bc1000163b28/1a29d8ced6b0f797cb0ec4ea2e768e77.png)

You can create filter criteria using both Match All and Match Any conditions. If you create conditions using both, _all_ of the criteria set in Match All must be true **and** _any_ criteria in Match Any can be true. For more information on available operators, see [Understand filter operators](https://help.kustomer.com/filter-operators-Sy8cQR5mU).

### Create a queue rule

Queue rules consist of conditions or criteria based on customer, conversation, or company data. Multiple rules can use the same queue and setting a queue for a rule is required. Conversations and tasks can only be assigned to one queue at a time.

**Notes:**

*   Workflows that trigger a conversation update will run before queue rules are applied, so you can use them to add, update, or delete attributes before the queue rules route the conversation to its queue.
*   The order in which your queue rules appear is important.

**To create a queue rule:**

1.  Go to **Settings ![](https://cdn.kustomerhostedcontent.com/media/570fad9d9001bc1000163b28/bf947d4f843bdbd0f4b7ebcb423c81ac.png) >****Platform >****Routing**.
2.  Go to the **Rules** tab and select **Add Rule**. 
3.  Fill in the following information:
    *   **Name** is the name of the rule.
    *   **Description** provides context on how the rule is used.
4.  Select whether you are creating the rule to route a **Conversation** or a **task** (custom object).
5.  Determine the **conditions** for the rule. For example, you can set up a queue rule to route all incoming chat conversations.  
    ![](https://cdn.kustomerhostedcontent.com/media/570fad9d9001bc1000163b28/6c7e11cea2d9f28dfee6fae96e854445.png)
6.  Then, use the [Assign rule to a queue](#assign) setting to choose which method to apply conversations to a queue based on this rule. 
7.  Last, select the name of the destination queue (if routing by display name) or queue key (if routing by queue key). For this example, we will route these conversations based on **Display Name** to a Chat Conversations queue. Enter the raw format in this box if you're using a queue key.
8.  Select **Save Changes**.

### **Timing: when queue rules evaluate**

Queue rules evaluate immediately when a conversation is created. If your queue rule depends on a conversation attribute that is set by a workflow, the attribute may not yet be populated when the queue rule runs.

****Workaround:**** Use a business rule triggered on ****All Updates**** as a fallback. When the workflow sets the attribute, the business rule fires and reassigns the conversation to the correct queue.

Alternatively, base your queue rules on customer-level or message-level attributes that are available at conversation creation time, rather than conversation-level attributes set by workflows.

### **When queue rules run in the automation sequence**

Kustomer automations execute in the following order:

1.  ****Workflows**** run first.
2.  ****Business rules**** run second.
3.  ****Queue rules**** run third.
4.  ****Routing**** assigns the conversation last.

When an AI agent is handling a conversation, queue routing rules do not apply until the AI agent hands off the conversation. The handoff occurs when the `routeConversations` tool is called, which triggers reassignment through the queue routing rules.

### Assign a rule to a queue

All rules must be assigned to a queue so that a conversation can be routed properly. Although multiple rules can be assigned to the same queue, conversations can only be assigned to one queue at a time.

When creating a queue rule, you can assign it to a queue using either the queue's **Display Name** or a **Queue Key**.

*   **Display Name**  
    This is the most common way to assign a rule to a queue. We recommend this method match a queue to a rule based on its name so you can easily select the desired queue without confusion. When you select this option, you'll see a drop-down menu that lists all available queues by their name.  
      
    
*   **Queue Key**  
    This is an advanced but powerful way of routing conversations. A queue key assigns a rule to a queue using conversation or customer attributes in raw format. Setting this up is more complicated, but queue keys allow you to build rules with variables referencing multiple queues. Learn more in [Use queue keys to streamline queue rules](https://help.kustomer.com/using-queue-keys-SyLiDFLY9).

### Set the order of queue rules

The order in which your queue rules are listed is very important. Queue rules are applied to conversations from top to bottom, so the best practice is to have more specific rules at the top of the list to ensure that conversations get routed correctly. 

**Note:** Order does not apply to skill rules. 

Let's explain this concept further using the two example queue rules we already created:

1.  A Customer chat queue rule that routes all incoming chat conversations.
2.  A Customer chat returns queue rule that routes all incoming chat conversations that are specifically for returns.

Those two rules are listed as follows. Note that Customer chat, the most general rule, is first in the list.

![](https://cdn.kustomerhostedcontent.com/media/570fad9d9001bc1000163b28/a8b8048ac77a58e69813566db4516cef.png)

Now, what would happen if both of these chat conversations are created? If the rules are kept in the same order, the _Customer chat returns_ rule will never be applied since the more general _Customer chat_ rule matches both conversations and is first on the list. 

Think of the rule order as a checklist of items. Since a conversation can only match one rule, the first rule that matches or is checked off of the list will always be applied first.

![](https://cdn.kustomerhostedcontent.com/media/570fad9d9001bc1000163b28/5f8cc5b115e82233b2da2c1233eb7ea5.gif)  

In this case, since both conversations are chat, the first rule would always match either scenario first, and route both to the same Chat queue. To prevent this, **the best practice when organizing rules is placing the most specific ones at the top of the list**. This ensures that those conditions are always applied first and conversations get routed to the correct queue. You can re-order rules by dragging and dropping them to a new location.

### Turn on queue rules

Once you create your rules, you need to activate them for them to route conversations to queues. To do so, turn on the toggle next to each rule. You can turn rules on and off as desired.

### ****Troubleshooting: Conversations Landing in the Default Queue****

The most common cause is a timing mismatch between attribute population and routing evaluation.

****Understanding the routing timing issue:**** When a new conversation becomes routable, the queue router evaluates your rules immediately. If your rules depend on conversation-level custom attributes set by workflows, those workflows may not have completed yet. As a result, the attributes are empty, no queue rule matches, and the conversation falls to the Default Queue.

****How to resolve this:****

1.  ****Use customer-level or message-level attributes**** in your queue rules where possible — these are available at routing time.
2.  ****Use a business rule as a fallback routing mechanism.**** Create a business rule triggered on "All Updates" that detects when the relevant attributes are written and then reassigns the conversation to the correct queue.
3.  ****Review queue rule ordering.**** Rules are evaluated top to bottom. Place your most specific rules at the top and the fallback at the bottom.

****Can I re-trigger routing rules?**** There is no built-in way to manually re-trigger queue routing rules. You can use a business rule or workflow to re-assign a conversation to a different queue after the required attributes have been populated.

### **Understand "Any" versus "All" condition logic in queue rules**

Queue rules evaluate conditions using two groups: ****All**** (AND logic) and ****Any**** (OR logic).

*   ****All****: Every condition in this group must be true for the rule to match.
*   ****Any****: Only one condition in this group must be true for the rule to match.

Conditions placed in the ****Any**** group are evaluated independently. This can lead to unexpected matches if one condition is broadly true.

****Example of unintended routing:****

A queue rule for a Billing queue has these conditions in the ****Any**** group:

*   Conversation name contains "Refund Request"
*   Channel is not one of: email, SMS, WhatsApp, voice

A Note conversation named "Follow-up call" matches this rule — not because the name contains "Refund Request," but because the Note channel is not email, SMS, WhatsApp, or voice. Since the conditions are in the ****Any**** group, only one needs to match.

****Fix:**** Move the channel condition to the ****All**** group, or change it to "Channel is one of" and select only the channels that should route to this queue.

> ****Tip:**** If your queue rule has more than one condition, consider whether all conditions must be true together. If so, place them in the ****All**** group.

### **Avoid broad matches with "Is Not" filters**

When you use "Is Not" or "Is Not One of" conditions in the ****Any**** (OR) section of a queue rule, a conversation only needs to match one of those conditions to be captured by the rule. This can create unintentionally broad matches.

For example, if your rule uses ****Any**** with "Message To is not [support@example.com](mailto:support@example.com)" and "Message To is notsales@example.com," any conversation whose recipient is not support@example.com satisfies the rule — even if it was sent to sales@example.com.

To fix this, move exclusion filters to the ****All**** (AND) section so that all conditions must be true simultaneously. Also, place more specific queue rules above general catch-all rules in the rule order.

### **Route SMS conversations by phone number**

To route inbound SMS conversations from different Kustomer Voice phone numbers to different queues:

1.  From the left navigation, click ****Settings****. The Settings page opens.
2.  Click ****Platform****, then select ****Queue Rules****.
3.  Create a new queue rule.
4.  Set the condition to match the inbound phone number. For example: __Conversation > Channel__ equals __SMS__ ****and**** the receiving phone number matches the desired number.
5.  Set the action to assign the conversation to the target queue.
6.  Repeat for each phone number and queue combination.

****Note:**** If you use Customer Assist (AI assistant), the AI agent handles the conversation first. Queue routing rules apply after the AI agent hands off the conversation using the Transfer to Agent or Transfer to Queue action.

### Related articles:

*   [Understand tasks](https://help.kustomer.com/understand-tasks-r1djh7wCC)
*   [Tutorial: Route a custom task](https://help.kustomer.com/route-a-task-SyrHSSC2A)
*   [Understand skill-based routing](http://help.kustomer.com/understand-skill-routing-ByTKNVPFR)
*   [Tutorial: Assign a conversation to an agent based on skill](https://help.kustomer.com/assign-conversation-based-on-skill-S1QJ_UykA)
