Articles on: AI Chatbot & Automations

How do I create a department routing Chatbot?

In this guide we'll introduce you to the "Team/Department Routing" type of scenarios. These are efficiently and convenient ways to automatically route conversations to the proper team, to help you get a head start when handling requests.

Crisp Chatbot software can be used to offer options to your users in order to determine their intent, and assign the conversation to your operators accordingly. We can perform either direct assignments to a specific operator, or update the conversation's data or segments in order to trigger a pre-configured routing rule.
These are very common usages of the Bot plugin, we'll show you to deploy your own in just a few minutes!

Just discovering the Bot plugin? Check out our Getting Started with the Bot plugin article first!

Let's get started with our conversation routing scenario!


Video Guide: Department Routing



In this video guide, Baptiste shows us how to set up a routing scenario by combining the features of the Bot plugin with the versatility of Routing Rules. This is a quick and easy way to automatically route your conversations to the proper team, and allow you to be more proactive and reactive to the requests submitted by your users.



Through our chatbot builder, we set a segment (then detected by our Routing Rules) when a user select our buttons, in order to route the conversation. But you can of course implement this differently! For instance, Condition blocks allow you to detect the current user's URL, would you wish to assign a conversation based on the current page your user is browsing.

Button pickers are available in chat conversations, but also with many integrations such as Whatsapp, Instagram, Messenger... They are a great way to interact with your users in order to better assist them.


Illustrated Guide: Routing Conversations with a chatbot and Routing Rules



Now let's see how we can leverage routing rules from a Bot scenario.

The idea here is to create a scenario that will help us respond to customers not only during the out-of-office hours of our business, but also when our team is offline.
We'll go through the basics to help you understand how such a chatbot scenario can be deployed, and give you some tips in order to adapt it to various situations.

This guide leverages the "Routing Rules" feature, in order to assign conversation to a pool of operators. Read more about Routing rules in this article

Overview of our Routing Scenario

Our Entry block, where we will connect our first Event block to start the scenario

We want our responder to listen to incoming messages, so we'll use the event block "User Message Matches" with the wildcard * as Match value, to detect all messages.
In our scenario, we're only detecting messages coming from the chatbox, so we've enabled the Message Origin "chat" only. You can of course specify whichever channels you'd like your scenario to be active on!

User Message Matches to capture all messages sent from the chatbox

Now let's send a welcome message to our users. We'll use the Action block "Send Message: Text" to specify our message. You can create different message for different languages from this menu as well.

Hello there!

In order to send our users a series of choices, we'll add an Action block "Send Message: Button pickers".
We can then add our buttons and their label, to fir the options that will be visible once it is sent to our users.

If you'd like this step to be mandatory and force your users to make their selection in order to continue chatting, you can enable the "Require" option

Sending our Buttons

Once we've sent our buttons, we now need to detect the user's selection with Event blocks "Button/Input Action, in order to execute the appropriate actions.
Each of our Event blocks should be added as new child, so that they can match one of the button we sent during step 4.

To quickly add Event blocks "Button/Input Action", you can alternatively hover your Button Picker Action block, and click the "lightning" icon next to each option, to automatically add a pre-configured Event block to your scenario.

Detecting the user's choice with the Event block "Button/Input Action"

Now we can either use the Action block "Internal Action: Assign Operator" or "Update User: Add Session Segment" in order to assign our conversation. In our example, we chose to show you both:
The "Assign operator" Action block will directly assign the conversation to the operator selected
The "Add Session Segment" will set a segment in this conversation, which can then be detected by the routing rules, if you've configured them.

Configuring routing rules can be done from your Crisp dashboard by navigating to: Settings > Website Settings > Message Routing Rules > Routing Rules
You will be able to create Advanced condition rules, and use the condition to check the chat segments you specified in your scenario. By creating a routing rule for each of your segment, Crisp will automatically assign the conversation to one of the available agents set in that rule when the segment is added.

Make sure to check out this guide for details on how to configure your routing rules in just a few minutes.

Direct Assignment and Segment to trigger Routing Rules

Let's now send another message with the Action block "Send Message: Text" to acknowledge the choice of our users, and let them know their request will promptly be handled :)

Sending a message for each choice made by the user

The Exit block "Stop Scenario" will allow us to prevent our scenario from triggering again in that same conversation for the next 24 hours.
This means that users will only see our away message once for the day, even if they send additional messages afterwards.

Instead of creating a "Stop Scenario" for each branch, the Bot interface allows you to easily merge this existing branches and connect them to a single block directly!


Your Team/Department routing chatbot is now ready! Don't forget to save and deploy your modifications before leaving the chatbot builder of course.


In this demonstration, we showed you two different approaches to route your conversation, either by assigning it directly to a specific operator or by adding a segment and leveraging the Routing Rules available in your Essentials and Plus plans.
This was done thanks to button pickers, allowing us to offer choices to our users, you can read more on that topic right here if you'd like.

You can also use Action blocks "Send Message: Composition" before sending your messages, to give your Bot a human touch!

⬇️ If you would like to review this scenario directly, you can download our example right here, and import it to create your own chatbot to take a closer look on your end.

And for those of you who have more questions and would like to dig deeper, don't hesitate checking our Understanding and Mastering the Bot plugin guide to learn more about the different blocks and their configuration.

Updated on: 28/10/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!