Triggers are used in states to guide the bot to give the right answer to your customers' questions. The most common triggers are Queries and Keywords, but there are a lot of additional and complementary rules as well.
Queries
Customer Queries are the most used and also the most intelligent way to trigger a state. If you, for example, want to trigger a certain state when a user asks the question “where is your office”, you can add this question as a Query. To do so, select 'Add query' and add your example sentence in the text field. Thanks to language recognition and AI, this trigger will get a match even if the customer writes the sentence slightly differently or has a typo in their sentence.
If you want to add more queries select 'add new query' on the bottom left corner of the container. You cannot separate queries with commas. There is no maximum number of queries you can have but you might experience performance issues if there are hundreds of queries in a single state.
As a general rule, it is good to have at least five example sentences to get enough accuracy and avoid "false positives" (i.e. bot giving the wrong answer).
Keywords
In addition to Queries, states can also be triggered using Keywords. Keywords are added with the triggers 'Any word', 'All words' and 'Not accepted words'.
To add Keywords, first select the 'Add new trigger' container and then choose a trigger. If you choose the trigger 'Any word', you will see a container with a text field where you can add different Keywords. Just type the word or word pair into the text field and hit enter. You can add as many as you like.
If you want to add another Keyword group, select 'add new rule' and select the same rule from the menu. If you have two groups of Keywords, the user’s message has to have at least one Keyword from both of these groups.
The same word should not exist in two different keyword groups in two different states as it would get a match from both of them.
The 'All words' trigger is very similar to the 'Any word' trigger. When using the 'All words' trigger, the user’s message has to include all the keywords defined in this one keyword group.
The trigger 'Not Accepted Words' works exactly like the previous triggers, but it has the opposite effect. If you, for example, add the word “hi” as a 'not accepted word', then only messages that do NOT include the word “hi” will trigger the state in question.
Useful tips and tricks
Wildcard (*) is very useful in saving your time. For example a Keyword 'play*' includes all words starting with "play" such as "playing" and "player".
It's good to remember that a Keyword group should include similar synonyms to a word. For example a customer could write one of the following:
- "I need to book a time for a doctor"
- "How can i reserve a time for a doctor"
- "How to schedule a time for a physician"
To cover these questions and several other variations of the same issue you can use these Keyword groups:
- Any word Keyword group 1: "how", "need"
- Any word Keyword group 2: "how", "reserv*", "schedul*"
- Any word Keyword group 3: "doctor", "physici*"
- Not accepted words: "cancel*"
Adding “cancel*” as a NOT accepted word will ensure that this state (information on booking) will not be returned if someone is asking about cancelling their appointment.
Other triggers
There are a bunch of additional triggers available in Studio. All triggers have a short explanation to make it easier for users to understand their purpose.
If you have any questions about other additional triggers and how to use them, please contact us through support.chatbot@leaddesk.com.