User Guide
This guide explains how to configure Assistant Routes in the Deepdesk Admin interface.
Prerequisites
Before creating routes, ensure you have:
- An Assistant configured: See Assistants User Guide
- Webhook integration enabled: Your CX platform must send messages to Deepdesk
- Tags available: Know which metadata fields are available in your message tags
Creating an Assistant Route
Step 1: Navigate to Assistant Routes
- Log in to the Deepdesk Admin interface
- In the left sidebar, navigate to Assistants > Assistant routes
- Click Add assistant route
Step 2: Select the Assistant
Click the magnifying glass icon next to the Assistant field to search for and select the Assistant that should handle matching messages.
Step 3: Configure the Tags (Matching Rules)
The Tags field contains a JsonLogic expression that determines which messages this route handles. The expression is evaluated against each incoming message's tags.
Basic Example
Match messages where the channel tag equals webchat:
{
"==": [{ "var": "channel" }, "webchat"]
}
Multiple Conditions (AND)
Match messages where channel is webchat AND queue is support:
{
"and": [
{ "==": [{ "var": "channel" }, "webchat"] },
{ "==": [{ "var": "queue" }, "support"] }
]
}
Multiple Conditions (OR)
Match messages from either webchat OR whatsapp channels:
{
"or": [
{ "==": [{ "var": "channel" }, "webchat"] },
{ "==": [{ "var": "channel" }, "whatsapp"] }
]
}
Checking for Tag Existence
Match messages that have a vip_customer tag set to true:
{
"==": [{ "var": "vip_customer" }, true]
}
Step 4: Save the Route
Click Save to create the route. The route becomes active immediately.
Managing Routes
Viewing All Routes
Navigate to Assistants > Assistant routes to see all configured routes with their:
- Associated Assistant
- Tag matching rules
Editing a Route
- Click on the route in the list
- Modify the Assistant or Tags
- Click Save
Deleting a Route
- Click on the route in the list
- Click Delete at the bottom of the page
- Confirm the deletion
Deleting a route immediately stops the Assistant from handling new messages matching that route. Active conversations will be deactivated.
Route Evaluation Order
When multiple routes could match a message:
- Routes are evaluated in the order they were created (by database ID)
- The first matching route is used
- Only one Assistant can be active per conversation at a time
If you need specific route priority, consider using more specific tag conditions to ensure the correct route matches.
Common Patterns
Chatbot for Unassigned Conversations
Route messages in the unassigned queue to a chatbot:
{
"==": [{ "var": "queue" }, "unassigned"]
}
Department-Specific Routing
Route based on the selected department:
{
"==": [{ "var": "department" }, "billing"]
}
Channel and Language Combination
Route Dutch WhatsApp messages to a Dutch-speaking bot:
{
"and": [
{ "==": [{ "var": "channel" }, "whatsapp"] },
{ "==": [{ "var": "language" }, "nl"] }
]
}
Excluding Specific Values
Route all messages except those from the vip queue:
{
"!=": [{ "var": "queue" }, "vip"]
}
Troubleshooting
Route Not Matching
- Verify tags: Check that the message contains the expected tags
- Check tag values: Ensure exact match (case-sensitive)
- Test JsonLogic: Use a JsonLogic tester to validate your expression
- Check route order: Another route may be matching first
Assistant Not Responding
- Check Assistant configuration: Ensure the Assistant is properly configured
- Verify webhook integration: Confirm messages are being ingested
- Check message source: Routing only processes visitor messages (not agent messages)
- Review logs: Check Backend logs for routing service errors
Conversation Not Deactivating
If an Assistant remains active after the conversation should have been re-routed:
- The conversation tags may not have changed
- The new tags may still match the current route
- Check if the CX platform is sending updated metadata
Best Practices
- Keep routes specific: Use detailed tag conditions to avoid unintended matches
- Document your routes: Maintain documentation of what each route handles
- Test before production: Test routes with sample messages before enabling for customers
- Monitor active conversations: Use the ConversationAssistantThread view in Admin to see active Assistant-conversation mappings
Related Documentation
- Overview: Conceptual overview of Assistant Routing
- Developer Guide: Technical details and API reference
- JsonLogic: Full reference for tag matching expressions
- Assistants: Configuring Assistants