Skip to main content

User Guide

This guide explains how to configure Assistant Routes in the Deepdesk Admin interface.

Prerequisites​

Before creating routes, ensure you have:

  1. An Assistant configured: See Assistants User Guide
  2. Webhook integration enabled: Your CX platform must send messages to Deepdesk
  3. Tags available: Know which metadata fields are available in your message tags

Creating an Assistant Route​

Step 1: Navigate to Assistant Routes​

  1. Log in to the Deepdesk Admin interface
  2. In the left sidebar, navigate to Assistants > Assistant routes
  3. 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​

  1. Click on the route in the list
  2. Modify the Assistant or Tags
  3. Click Save

Deleting a Route​

  1. Click on the route in the list
  2. Click Delete at the bottom of the page
  3. Confirm the deletion
warning

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:

  1. Routes are evaluated in the order they were created (by database ID)
  2. The first matching route is used
  3. Only one Assistant can be active per conversation at a time
info

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​

  1. Verify tags: Check that the message contains the expected tags
  2. Check tag values: Ensure exact match (case-sensitive)
  3. Test JsonLogic: Use a JsonLogic tester to validate your expression
  4. Check route order: Another route may be matching first

Assistant Not Responding​

  1. Check Assistant configuration: Ensure the Assistant is properly configured
  2. Verify webhook integration: Confirm messages are being ingested
  3. Check message source: Routing only processes visitor messages (not agent messages)
  4. 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:

  1. The conversation tags may not have changed
  2. The new tags may still match the current route
  3. Check if the CX platform is sending updated metadata

Best Practices​

  1. Keep routes specific: Use detailed tag conditions to avoid unintended matches
  2. Document your routes: Maintain documentation of what each route handles
  3. Test before production: Test routes with sample messages before enabling for customers
  4. Monitor active conversations: Use the ConversationAssistantThread view in Admin to see active Assistant-conversation mappings