How to use the chatbot to build automated routing rules?
This article explains how to route conversations automatically by combining Workflow Builder segments with Crisp routing rules.
A workflow can collect the user’s intent, save it as a segment, and let your existing routing rules assign the conversation to the right team. This is useful when you want users to choose a department first, while still keeping routing logic centralized in your Crisp workspace settings.
Create the workflow choice
Start by creating a workflow from Crisp in AI Agent → Automate → Workflow Builder.
You can identify the user’s need in two common ways:
- Button picker → the user selects a visible option such as Sales, Support, or Billing
- Message match → the workflow detects words or patterns in the user’s message
The button picker is usually easier to maintain because the user chooses from clear options. Pattern matches are useful when you want the user to type naturally, but they require more careful testing.
Set a user segment
Once the user has selected a department or the workflow has detected their intent, add an action block that sets a user segment.
For example:
- department_sales → for sales requests
- department_support → for support requests
- department_billing → for billing requests
Segments are useful because routing rules can read them later. They also remain visible in the contact profile, which helps agents understand why a conversation was routed to them.
Create the routing rule
After the workflow sets the segment, create a routing rule from Settings → Inbox Settings → Operator Routing → Add a Routing Rule.
Click Add a routing rule, choose a clear name, then select Advanced condition.

Select Contact segments as the condition data, then choose the segment set by your workflow.



Once the condition matches, configure the action you want Crisp to perform, such as assigning the conversation to a teammate or moving it to a sub-inbox.
Alternative: push segments with the JavaScript SDK
You do not always need a workflow to set segments. If your website or product already knows the user’s lifecycle stage, plan, country, or intent, you can push user data through the JavaScript SDK and let routing rules use that data directly.
This approach is often better when the information already exists in your product, while the workflow approach is better when you need to ask the user first.
Updated on: 04/05/2026
Thank you!