Zendesk

How to Route Tickets to the Right Departments in Zendesk (Without Keywords Triggering on Agent Replies)

Learn how to set up department-based ticket routing in Zendesk using triggers, avoid common keyword routing pitfalls, and prevent agent replies from re-routing tickets to wrong departments.

calender-image
November 5, 2025
clock-image
8 minutes

Setting up departments in Zendesk can feel like organizing a well-oiled machine—until you realize your keyword-based routing triggers are firing on agent replies and moving tickets to the wrong departments. If you've ever watched a ticket bounce between groups because an agent mentioned the wrong keyword in their response, you're not alone.

Here's the good news: with the right trigger conditions and routing strategies, you can create a department-style setup that routes tickets accurately without the chaos.

The Problem: When Keywords Trigger on Everything

Let's say you've set up your Zendesk instance with multiple support email addresses for different departments—sales@company.com, billing@company.com, and support@company.com. You've created groups for each department and set up triggers that look for specific keywords to route tickets accordingly.

Everything works perfectly... until it doesn't.

The issue? Your triggers are evaluating every update to a ticket, including agent replies. When an agent in Department 1 responds to a customer and mentions "billing" in their message, your billing trigger fires and moves the ticket to the Billing department. Now you've got tickets ping-ponging between departments, confused customers, and frustrated agents.

The Core Issue: By default, triggers in Zendesk fire on both ticket creation and updates, which means they evaluate agent comments just like they evaluate customer messages.

Solution 1: Use the "Current User = End User" Condition

The most effective way to prevent triggers from firing on agent replies is to add a condition that ensures triggers only fire when an end user (customer) is making the update.

How to Set It Up

When creating your routing triggers, add this condition to each one:

Condition: Current User | Is | (end user)

This tells Zendesk to only fire the trigger when the person updating the ticket is an end user, not an agent. Here's how this works in practice:

  1. Navigate to Admin Center > Objects and rules > Business rules > Triggers
  2. Create or edit your routing trigger
  3. Under "Meet ALL of the following conditions," add:
    • Current User | Is | (end user)
    • Your keyword or routing conditions
  4. Set your action to assign the ticket to the appropriate group

According to Zendesk's official documentation, the "Current user" condition allows you to differentiate between agents and end users making updates to tickets, ensuring your routing logic only applies to incoming customer requests, not agent replies.

Why This Works

As one Zendesk user explained: "Is likely what you want though, depending on your needs. Often this kind of ticket routing is only desired once when the ticket is created and only manual hand-offs between departments afterwards which is what you'll get with this condition."

Solution 2: Add the "Ticket Is Created" Condition

Another approach is to ensure your routing triggers only fire when a ticket is first created, not on subsequent updates.

Condition: Ticket | Is | Created

This condition ensures the trigger runs only during ticket creation. Combined with keyword matching, it prevents re-routing when agents add comments.

When to Use This Method

This approach works best when:

  • You want tickets routed only once at creation
  • You prefer manual transfers between departments after initial routing
  • Your routing logic is based on the initial ticket content, not ongoing conversation

According to Zendesk's trigger documentation, the "Ticket | Is | Created" condition is specifically designed to fire only when tickets are first submitted, making it ideal for initial routing decisions.

Solution 3: Use the "Received At" Condition for Email-Based Routing

If your departments have separate support email addresses, you can route based on where the email was received rather than keywords.

How to Set It Up

  1. Create separate support addresses for each department (sales@, billing@, support@)
  2. Create a trigger for each department:

This method is more reliable than keyword matching because it's based on which email address the customer contacted, not the content of their message.

As documented in Zendesk's help center, the "Received at" condition checks the email address from which the ticket was received, providing a concrete routing criterion that won't change based on message content.

Important Note

When forwarding emails to your Zendesk support address, be aware that Zendesk recognizes tickets as being received at your Zendesk support email address. To prevent triggers from firing incorrectly, you may need to target the external email address in your condition.

Solution 4: Leverage Organizations for Department Routing

For companies with multiple client organizations or clear customer segments, organization-based routing can be more reliable than keyword matching.

How Organizations Work for Routing

Organizations in Zendesk let you group users together and automatically route their tickets to specific groups. Here's the setup:

  1. Create organizations for different customer types or companies
  2. Enable domain mapping so users are automatically added to organizations based on their email domain
  3. Set up organization-level group routing or use triggers with organization conditions

According to Zendesk's documentation on organizations, you can set up group mapping at the organization level, which automatically assigns all tickets from that organization to a specified group without needing triggers at all.

Example Setup

Let's say you support different service tiers:

  • Create organizations for "Enterprise," "Professional," and "Basic" customers
  • Add a trigger condition: Organization | Is | Enterprise
  • Set the action to route to your Enterprise Support group

This approach is particularly powerful when combined with user tagging, allowing you to create sophisticated routing rules based on customer attributes rather than message content.

Solution 5: Implement Omnichannel Routing with Custom Queues

For larger teams or more complex routing needs, Zendesk's Omnichannel Routing with Custom Queues offers a sophisticated solution that goes beyond simple trigger-based routing.

What Are Custom Queues?

Custom queues allow you to create multiple routing pathways with primary and secondary (overflow) groups. As one Zendesk expert noted: "If you have access to Omnichannel Routing and the Custom Queues feature I would recommend getting familiar with that feature over going down this trigger-based sooner rather than later."

Key Benefits

  1. Multiple group routing: Route tickets to several groups simultaneously
  2. Overflow handling: Set secondary groups as fallback options
  3. Priority-based assignment: Ensure urgent tickets get handled first
  4. Skill-based routing: Match tickets to agents with specific expertise

According to Zendesk's omnichannel routing documentation, custom queues provide sophisticated routing logic that automatically assigns tickets to available agents based on capacity, skills, and availability.

When to Consider This Option

Omnichannel Routing is available on Professional and Enterprise plans and is particularly valuable when:

  • You have multiple support channels (email, chat, phone)
  • You need overflow routing when primary groups are at capacity
  • You want to route based on agent availability and capacity
  • Your routing needs are complex and change frequently

Best Practices for Keyword-Based Routing

If you decide to stick with keyword-based routing, here are some tips to make it work better:

1. Be Specific with Your Keywords

Instead of broad terms like "question" or "help," use specific product names, feature names, or unique identifiers that customers use but agents are less likely to mention casually.

2. Use "AND" Conditions

Require multiple keyword matches to route a ticket. This reduces false positives:

  • Ticket | Description | Contains word | "refund"
  • AND Ticket | Description | Contains word | "payment"

3. Consider Keyword Position

Use the "Contains the following string" operator carefully. As one user pointed out: "Depending on your situation, have you considered using organisations? For example, if you have a supplier that always raises queries for a certain group to handle, have those end users setup in an Org, and exclude these from the buzzword routing."

4. Watch for "Following Words" vs "Following String"

  • "Following words" matches individual words anywhere in the text
  • "Following string" matches exact phrases

Choose the right operator based on your needs, and test thoroughly.

Structuring Your Triggers for Success

Based on best practices from Zendesk experts, here's how to organize your routing triggers:

1. Order Matters

Triggers run from top to bottom, so structure them strategically:

  • First: Categorization triggers (tags, fields, spam detection)
  • Second: Routing triggers (group assignment)
  • Third: Notification triggers (emails to customers and agents)

As explained in Internal Note's comprehensive trigger guide: "I work my way from categorisation, towards assignment, and then notifications. Or to put it differently, if the end goal of a ticket is that it's being resolved by the right person, we need to make sure we first define what the ticket is about, then route the ticket to the right team or person."

2. Use a Fallback Trigger

Create a final trigger that catches any tickets that didn't match your routing conditions:

  • Condition: Ticket | Group | Is not | (set)
  • Action: Ticket | Group | Default Support
  • Add a tag like "routing_fallback" so you can identify and fix gaps in your routing logic

3. Keep It Simple

The more complex your trigger, the harder it is to troubleshoot. As Zendesk's documentation advises: "It is recommended to keep your trigger statements simple. The more complicated a trigger is, the harder it will be to troubleshoot and maintain."

Testing Your Department Routing

Before rolling out your new routing setup, test it thoroughly:

  1. Create test tickets from different scenarios:
    • New customer inquiries
    • Agent replies with potential trigger keywords
    • Tickets from different organizations
    • Tickets via different channels
  2. Check the ticket audit log to see which triggers fired and why
  3. Monitor your fallback trigger to see if tickets are slipping through
  4. Get agent feedback on whether tickets are landing in the right place

Common Pitfalls to Avoid

1. Forgetting About Agent Comments

Always add conditions to prevent triggers from firing on agent updates unless that's intentional.

2. Not Testing With Real Content

Keywords that seem unique in theory might appear in agent responses more than you think. Test with actual ticket content.

3. Over-Relying on Keywords

If your routing is constantly breaking, it might be time to move to organization-based routing or omnichannel routing with custom queues.

4. Ignoring Ticket Updates

Remember that triggers can fire on updates too. Use "Ticket | Is | Created" if you only want one-time routing.

Wrapping Up

Routing tickets to the right departments in Zendesk doesn't have to be a headache. The key is understanding when and why your triggers are firing, and setting up conditions that prevent agent replies from interfering with your routing logic.

Start with the "Current User = End User" condition—it's the quickest fix for most keyword-based routing issues. If you need more sophisticated routing, consider organizations, the "Received at" condition, or upgrading to Omnichannel Routing with Custom Queues.

Remember: the best routing setup is the one that works reliably for your team without constant maintenance. Start simple, test thoroughly, and add complexity only when needed.

About Macha AI

Macha AI builds purpose-built AI apps for Zendesk — including Copilot, Auto Reply, and Translations — designed to help agents work faster and smarter. And this is just the beginning. Many more apps are on the way. Learn more → getmacha.com