How can I create a support chatbot to answer customers automatically?
This guide will focus on triggering a scenario to start when a message from a user is received. It is the most common approach to start a chatbot.
There are three main ways to start a scenario with the Bot plugin, we have created guides to cover these different methods and allow you to efficiently understand how scenarios can be started, as well as some good practice advice to help you along the way.
Looking for a different way to start your scenario? Check out these guides as well:
How to start a Bot Scenario without a user sending a message
How to start a Bot Scenario manually
🤖 If you're just getting started with the Bot plugin, feel free to check out this guide to take you through your first steps .
Now, let's have a look at how we can start our scenarios when a user is sending a message into a conversation!
To force a scenario to start only once when your users first contact you, you can add a Condition block "Condition is New" right after your initial Event block "User Message Matches".
A Bot Scenario will not start if an Operator has sent a message in the past 20 minutes during the conversation, to avoid potential confusion. If an Operator sends a message during the execution of a scenario, this will interrupt its execution and terminate the flow.
Starting a Scenario when any message is received
Starting a Scenario when specific messages or keywords are detected
Frequently Asked Questions
This is the main method you will use when creating Bot Scenarios, it helps cover a wide range of usages by enabling you to detect any message sent by a user.
It is also very easy to set up, you will simply need to use the Event block "User Message Matches" with a Match value *
We'll start by creating a scenario which can detect when a user sends us any message in a conversation
When using the single wildcard * in a "User Message Matches" Event block, this indicates to the bot than any message/term should trigger your event block and be detected.
Let's see a quick example in action :
Your Event block "User Message Matches" can also be configured to only detect messages from specific channels (chat, whatsapp, email, etc...) by selecting them in the "Origin" setting of this block. By default, if no specific channel is selected, the Bot will detect messages from all of the available channels.
Now, perhaps we'd like our scenario to only start when specific conditions are met
You can absolutely add conditions if you would like to detect messages under certain situations only!
Because we need our initial Event block to be connected to the Entry Gate (so that our scenario can listen to incoming messages) we will need to add our conditions right below the "User Message Matches" Event block .
This way our Bot will first listen to incoming messages, then verify that the conditions specified are met, and finally execute our flow and actions when this is the case. Let's check how to set this up, to handle cases where a conversation is new or not.
You can create new branches by adding your blocks as "new child" and be able to handle any sort of situation by using the various condition blocks available. You can also set multiple conditions inside of a single block to be more concise!
To detect any message received, but also when the user uploads a file, audio recording or a picture for instance, you can also use the Event block "New User Message" instead of the "User Message Matches" with *
Using AI to automatically answer customers and suggest relevant articles
Instead of sending a generic message when our users reach out to us, we can leverage the AI capabilities of Crisp to automatically suggest articles to our users if anything match their request.
The Bot plugin is able to parse through the user's message and use AI to efficiently understand the user's query and offer the user to refer to an article of your Helpdesk.
The Helpdesk is another feature of the Essentials and Plus plans, you can easily get started and create your own knowledge base with Crisp !
You can review this dedicated article for a more in-depth look at this AI feature to pair the Bot and Helpdesk in your scenarios.
In some cases, you might want to only detect messages containing specific keywords or patterns.
To do that, it is important to understand how pattern recognition works in the Bot, and what "wildcards" such as * and ** represent. Don't hesitate having a look at our article Understanding and Mastering the Bot plugin to learn more about the different blocks, including the "User Message Matches" one.
We saw in the previous section that simply using the Match value of * will detect any message sent by a user. To detect a specific messages containing specific patterns instead, we can specify these in our "User Message Matches" block configuration.
However, if we simply detect the value help, our Bot will detect messages where the user only composed of the word "help" but not instances where the term is used inside of a sentence, such as "hello, i need some help here".
This is because without the use of wildcards, the Bot will look for an exact match .
In order to detect our keyword inside of a sentence, with other terms and words, we'll need to add a single wildcard * before and after that term.
Each of the wildcard will indicate the Bot that we wish to detect our keyword even if there other terms before or after it.
For instance, to detect the term "help" in a message like "hello, I need some help here" and trigger our scenario, we can use a Match value of *help*. By wrapping our keyword around wildcards, we let the Bot know that we also want to capture it if there are other adjacent terms.
You can also use double wildcards if, instead of detecting adjacent words, you would like to detect juxtaposed characters around your keyword.
For instance a Match value of **range** will also trigger your Bot if users employ the words "orange", "arrangement" or "deranged".
With the concept of single and double wildcards out of the way, let's see a few of examples.
We want to detect if a user needs help recovering their lost password so that we can automatically send them the link to a dedicated article.
We'll need to use the Event block "User Message Matches" and fill in the keywords we want our Bot Scenario to be triggered.
For our use case, we can simply detect messages containing patterns such as "forgot/lost my password". However, these may be used in a longer sentence, so we'll need to leverage the wildcards * around our terms, for the Bot to recognize them efficiently.
In order to do that, let's tell our Bot to trigger when *lost my password* and forgot my password ` are present in a message, so that it can start if users send messages such as "Hello, I think I forgot my password" or "hi, i lost my password, can you help?". Let's see this in action:
Our setup works great, but perhaps we would also like to be able to detect if a user has questions about their subscriptions, in which case we want to notify our account manager.
Bot Scenarios can accept multiple Event blocks "User Message Matches" at the same level without any issue. This way, we can create another branch if a different pattern is recognized, and allow our scenario to continue with the adequate flow.
Let's take things further! It would be cool if we could also detect cases where users different requests, to let them know our support team is on the way.
There are a couple of ways we could handle cases where the user doesn't send a message containing one of the keyword we want to detect.
One way to do this, would be to create a third Event block "user message matches" in order to detect the same patterns as in our previous event block, but this time by enabling the "Negate" option so that our Bot follows this branch when a message doesn't contain any of these patterns .
A simpler way however, would be to add a third Event block and just use the single wildcard * as Match value. As you learned earlier, a single * value will detect any message sent by the user.
Indeed you may have noticed that when your scenario splits into several branches, there is a number on each of the wire. This number indicates the priority of that branche.
When the Bot has several "paths" available, he will only be able to follow one. The Bot will check these paths one by one by order of priority (the number on the wire) and proceed with the first one he is eligible to.
In our case, when a message is received, the bot will first check if it contains our "lost password" patterns, then our "demo" ones, and finally: if the message contains any pattern.
This will ensure that our Bot always has a fallback path in cases the message doesn't contain a pattern recognized by our first two "User Message Matches" blocks.
Let's see a live example to illustrate this:
And that's all there is to it! If you'd like to learn more about Branch Priority, don't hesitate checking the Tips and Tricks section of our Getting Started guide .
Still have some questions about the Bot that were not covered in this article or related guides? Perhaps you'll find the answer here!
Here is a collection of the most frequently asked questions, you'll also find some extra resources to help you better understand how this plugin works, and to prepare for the most obscure and extravagant use-cases.
Don't hesitate visiting this in-depth article to learn more about the Bot and master your craftsmanship of scenarios
If your question does not figure here, share it with us directly by chat, we'll be available!
Absolutely, yes. You can add any conditions you wish in your flow to check if a conversation is new, the user's language or location, if a specific segment is set, and more.
When you wish to start your scenario under specific conditions , you will need to add your condition block after your initial "User Message Matches" initial block, as it is required for that one to be connected to your Entry Gate, in order for messages to be detected.
Your scenario would therefore look something like Entry Gate → Event Block (User Message Matches) → Condition Block (with your conditions there) → Rest of your flow
This is possible yes, you can use the Event block "New User Message" to do this.
While the "User Message Matches" can only be used to detect text messages sent by users, the "New User Message" will detect any message type sent by the user including files, pictures or audio recordings for instance.
This can be troubleshooted by following a few steps.
Ensure that your scenario was properly saved and deployed. You can also verify that it is enabled from the Scenario Manager view.
Make sure your scenario is properly configured and that the message your user sent is matching what your "User Message Matches" block expects. You want to ensure that you used wildcards properly as well, don't hesitate to refer to this section of our guide . Check that you selected the correct "origins" inside your block as well.
A scenario will not start if an operator has sent a message during the past 20 minutes, you can hover messages in that conversation to view the timestamps if you have any doubt. Also note that if you use a "Exit Block - Stop Scenario" at the end of your flow, it will prevent your scenario from triggering again during the next 24 hours, if it already ran once during this conversation.
If one of your operators sends a message in the conversation during the scenario, it will interrupt the execution of that scenario. It will also prevent any automated scenario from triggering again for the next 20 minutes.
Inside of your Event block "User Message Matches" used to start your scenario, you can select the "Origin" channels from which you wish messages to be detected (and thus trigger your flow).
You can select one or several origin if you wish, so that your scenario only starts if the message was sent from one of them.
If you want to verify the origin of a message later in your scenario, for instance if you wish to continue on a certain branch only if the conversation is via email (or anything else), you can use a Condition block "is Segment set".
Indeed, when a conversation lands in your Crisp inbox, a segment is automatically added based on its origin, such as instagram, messenger, email, chat, etc...
This can unfortunately happen, there is nothing much we can do about it at Crisp. You should contact the Tyrell Corporation directly to submit a complaint.
This is possible yes! You can check out this guide which explains in great details how to collect information from your users and store this information to update their profile on use them in a message.
On top of this, if the information is already available in the conversation, you can have access to these global variables:
{{ name.full }}, {{ name.last }}, {{ name.first }}, {{ email }}, {{ phone }}, {{ city }} and {{ country }}
Here is an example for a user named Cristobal Del Viberto located in Spain:
A message such as Hello {{ name.first }}, how is life treating you in {{ country }} this summer?
would result in Hello Cristobal, how is life treating you in Spain this summer?
And if you'd like to customize your messages with even more variables, the Bot also lets you access the custom data set in your conversations or contact profiles with {{ data.key_name }}
If a conversation or contact has a Custom data such as "crisp-plan: essentials", you can therefore output with {{ data.crisp-plan }}
There are three main ways to start a scenario with the Bot plugin, we have created guides to cover these different methods and allow you to efficiently understand how scenarios can be started, as well as some good practice advice to help you along the way.
Looking for a different way to start your scenario? Check out these guides as well:
How to start a Bot Scenario without a user sending a message
How to start a Bot Scenario manually
🤖 If you're just getting started with the Bot plugin, feel free to check out this guide to take you through your first steps .
Now, let's have a look at how we can start our scenarios when a user is sending a message into a conversation!
To force a scenario to start only once when your users first contact you, you can add a Condition block "Condition is New" right after your initial Event block "User Message Matches".
A Bot Scenario will not start if an Operator has sent a message in the past 20 minutes during the conversation, to avoid potential confusion. If an Operator sends a message during the execution of a scenario, this will interrupt its execution and terminate the flow.
Table of Content
Starting a Scenario when any message is received
Starting a Scenario when specific messages or keywords are detected
Frequently Asked Questions
Starting a Scenario when any message is received
This is the main method you will use when creating Bot Scenarios, it helps cover a wide range of usages by enabling you to detect any message sent by a user.
It is also very easy to set up, you will simply need to use the Event block "User Message Matches" with a Match value *
We'll start by creating a scenario which can detect when a user sends us any message in a conversation
When using the single wildcard * in a "User Message Matches" Event block, this indicates to the bot than any message/term should trigger your event block and be detected.
Let's see a quick example in action :
Your Event block "User Message Matches" can also be configured to only detect messages from specific channels (chat, whatsapp, email, etc...) by selecting them in the "Origin" setting of this block. By default, if no specific channel is selected, the Bot will detect messages from all of the available channels.
Now, perhaps we'd like our scenario to only start when specific conditions are met
You can absolutely add conditions if you would like to detect messages under certain situations only!
Because we need our initial Event block to be connected to the Entry Gate (so that our scenario can listen to incoming messages) we will need to add our conditions right below the "User Message Matches" Event block .
This way our Bot will first listen to incoming messages, then verify that the conditions specified are met, and finally execute our flow and actions when this is the case. Let's check how to set this up, to handle cases where a conversation is new or not.
You can create new branches by adding your blocks as "new child" and be able to handle any sort of situation by using the various condition blocks available. You can also set multiple conditions inside of a single block to be more concise!
To detect any message received, but also when the user uploads a file, audio recording or a picture for instance, you can also use the Event block "New User Message" instead of the "User Message Matches" with *
Using AI to automatically answer customers and suggest relevant articles
Instead of sending a generic message when our users reach out to us, we can leverage the AI capabilities of Crisp to automatically suggest articles to our users if anything match their request.
The Bot plugin is able to parse through the user's message and use AI to efficiently understand the user's query and offer the user to refer to an article of your Helpdesk.
The Helpdesk is another feature of the Essentials and Plus plans, you can easily get started and create your own knowledge base with Crisp !
You can review this dedicated article for a more in-depth look at this AI feature to pair the Bot and Helpdesk in your scenarios.
Starting a Scenario when specific messages or terms are detected
In some cases, you might want to only detect messages containing specific keywords or patterns.
To do that, it is important to understand how pattern recognition works in the Bot, and what "wildcards" such as * and ** represent. Don't hesitate having a look at our article Understanding and Mastering the Bot plugin to learn more about the different blocks, including the "User Message Matches" one.
We saw in the previous section that simply using the Match value of * will detect any message sent by a user. To detect a specific messages containing specific patterns instead, we can specify these in our "User Message Matches" block configuration.
However, if we simply detect the value help, our Bot will detect messages where the user only composed of the word "help" but not instances where the term is used inside of a sentence, such as "hello, i need some help here".
This is because without the use of wildcards, the Bot will look for an exact match .
In order to detect our keyword inside of a sentence, with other terms and words, we'll need to add a single wildcard * before and after that term.
Each of the wildcard will indicate the Bot that we wish to detect our keyword even if there other terms before or after it.
For instance, to detect the term "help" in a message like "hello, I need some help here" and trigger our scenario, we can use a Match value of *help*. By wrapping our keyword around wildcards, we let the Bot know that we also want to capture it if there are other adjacent terms.
You can also use double wildcards if, instead of detecting adjacent words, you would like to detect juxtaposed characters around your keyword.
For instance a Match value of **range** will also trigger your Bot if users employ the words "orange", "arrangement" or "deranged".
With the concept of single and double wildcards out of the way, let's see a few of examples.
We want to detect if a user needs help recovering their lost password so that we can automatically send them the link to a dedicated article.
We'll need to use the Event block "User Message Matches" and fill in the keywords we want our Bot Scenario to be triggered.
For our use case, we can simply detect messages containing patterns such as "forgot/lost my password". However, these may be used in a longer sentence, so we'll need to leverage the wildcards * around our terms, for the Bot to recognize them efficiently.
In order to do that, let's tell our Bot to trigger when *lost my password* and forgot my password ` are present in a message, so that it can start if users send messages such as "Hello, I think I forgot my password" or "hi, i lost my password, can you help?". Let's see this in action:
Our setup works great, but perhaps we would also like to be able to detect if a user has questions about their subscriptions, in which case we want to notify our account manager.
Bot Scenarios can accept multiple Event blocks "User Message Matches" at the same level without any issue. This way, we can create another branch if a different pattern is recognized, and allow our scenario to continue with the adequate flow.
Let's take things further! It would be cool if we could also detect cases where users different requests, to let them know our support team is on the way.
There are a couple of ways we could handle cases where the user doesn't send a message containing one of the keyword we want to detect.
One way to do this, would be to create a third Event block "user message matches" in order to detect the same patterns as in our previous event block, but this time by enabling the "Negate" option so that our Bot follows this branch when a message doesn't contain any of these patterns .
A simpler way however, would be to add a third Event block and just use the single wildcard * as Match value. As you learned earlier, a single * value will detect any message sent by the user.
Indeed you may have noticed that when your scenario splits into several branches, there is a number on each of the wire. This number indicates the priority of that branche.
When the Bot has several "paths" available, he will only be able to follow one. The Bot will check these paths one by one by order of priority (the number on the wire) and proceed with the first one he is eligible to.
In our case, when a message is received, the bot will first check if it contains our "lost password" patterns, then our "demo" ones, and finally: if the message contains any pattern.
This will ensure that our Bot always has a fallback path in cases the message doesn't contain a pattern recognized by our first two "User Message Matches" blocks.
Let's see a live example to illustrate this:
And that's all there is to it! If you'd like to learn more about Branch Priority, don't hesitate checking the Tips and Tricks section of our Getting Started guide .
Frequently Asked Questions
Still have some questions about the Bot that were not covered in this article or related guides? Perhaps you'll find the answer here!
Here is a collection of the most frequently asked questions, you'll also find some extra resources to help you better understand how this plugin works, and to prepare for the most obscure and extravagant use-cases.
Don't hesitate visiting this in-depth article to learn more about the Bot and master your craftsmanship of scenarios
If your question does not figure here, share it with us directly by chat, we'll be available!
Can my scenario only start for new conversations, or when only specific conditions are met?
Absolutely, yes. You can add any conditions you wish in your flow to check if a conversation is new, the user's language or location, if a specific segment is set, and more.
When you wish to start your scenario under specific conditions , you will need to add your condition block after your initial "User Message Matches" initial block, as it is required for that one to be connected to your Entry Gate, in order for messages to be detected.
Your scenario would therefore look something like Entry Gate → Event Block (User Message Matches) → Condition Block (with your conditions there) → Rest of your flow
Can I start my scenario when users upload files, images, audio messages, etc?
This is possible yes, you can use the Event block "New User Message" to do this.
While the "User Message Matches" can only be used to detect text messages sent by users, the "New User Message" will detect any message type sent by the user including files, pictures or audio recordings for instance.
A user sent a message in a conversation but my scenario did not start. What happened?
This can be troubleshooted by following a few steps.
Ensure that your scenario was properly saved and deployed. You can also verify that it is enabled from the Scenario Manager view.
Make sure your scenario is properly configured and that the message your user sent is matching what your "User Message Matches" block expects. You want to ensure that you used wildcards properly as well, don't hesitate to refer to this section of our guide . Check that you selected the correct "origins" inside your block as well.
A scenario will not start if an operator has sent a message during the past 20 minutes, you can hover messages in that conversation to view the timestamps if you have any doubt. Also note that if you use a "Exit Block - Stop Scenario" at the end of your flow, it will prevent your scenario from triggering again during the next 24 hours, if it already ran once during this conversation.
What happens if an operator sends a message during the execution of a scenario?
If one of your operators sends a message in the conversation during the scenario, it will interrupt the execution of that scenario. It will also prevent any automated scenario from triggering again for the next 20 minutes.
How can I have my scenario start only a message is sent from a specific channel (such as Instagram, Whatsapp, etc)?
Inside of your Event block "User Message Matches" used to start your scenario, you can select the "Origin" channels from which you wish messages to be detected (and thus trigger your flow).
You can select one or several origin if you wish, so that your scenario only starts if the message was sent from one of them.
If you want to verify the origin of a message later in your scenario, for instance if you wish to continue on a certain branch only if the conversation is via email (or anything else), you can use a Condition block "is Segment set".
Indeed, when a conversation lands in your Crisp inbox, a segment is automatically added based on its origin, such as instagram, messenger, email, chat, etc...
A Blade Runner has slain my Bot and now it won't work anymore. What can I do?
This can unfortunately happen, there is nothing much we can do about it at Crisp. You should contact the Tyrell Corporation directly to submit a complaint.
Can I use variables in the messages sent by the Bot plugin, to output a user's name, email, or phone number automatically?
This is possible yes! You can check out this guide which explains in great details how to collect information from your users and store this information to update their profile on use them in a message.
On top of this, if the information is already available in the conversation, you can have access to these global variables:
{{ name.full }}, {{ name.last }}, {{ name.first }}, {{ email }}, {{ phone }}, {{ city }} and {{ country }}
Here is an example for a user named Cristobal Del Viberto located in Spain:
A message such as Hello {{ name.first }}, how is life treating you in {{ country }} this summer?
would result in Hello Cristobal, how is life treating you in Spain this summer?
And if you'd like to customize your messages with even more variables, the Bot also lets you access the custom data set in your conversations or contact profiles with {{ data.key_name }}
If a conversation or contact has a Custom data such as "crisp-plan: essentials", you can therefore output with {{ data.crisp-plan }}
Updated on: 04/11/2024
Thank you!