Advanced intents give you far more options and customization than basic intents but have more parts to understand because of this. Let's cover how to create an advanced intent and what each part does.
Adding Advanced Intents
You can add advanced intents by pressing the Add Advanced Intent button seen near the Available Intents below. This can be found under both questions and global intents.
Editing Advanced Intents
When first creating the advanced intent, you'll see the window below pop up.
Let's start with the upper most part.
Name
This will be the name of your intent. To learn more about how to name you intents, see Naming Conventions for Intents and Questions.
Description
This is a brief description of the intent and it's purpose. While not necessary, it's useful if you need to remember what an intent is for or if you're working in a team.
Intent Listeners
The listener is very important to a working intent. This is what actually listens for a users response so it knows how to respond. Let's look at how to make one. First, click Add Listener.
Name
This is the name of the listener. If you are editing a previously created Assistant intent, by default it will be the intent name. Using the same name as the intent for the listener is fine and you shouldn't run into any issues.
Description
This is an optional description for the listener and what it is listening for. Just like the intent description, while not necessary, it's useful if you need to remember what an intent is for or if you're working in a team.
Regular Expression
This is what your listener will actually "listen" for. A regular expression (RegEx) is a special way to search the users input to find exactly what you want to respond to. Below is a quick summary of simple ways to use regular expressions. For a more in depth guide, see Regular Expressions.
| - separates lists of words to be matched ("cat|dog" will match a phrase containing either "cat" or "dog")
^ - match the start of a user's input ("^cat" will match anything starting with "cat")
$ - match the very end of a user's input ("cat$" will match any sentence ending with "cat")
\b - match a word break ("\bcat\b" will match "cat" exactly, but not "cats" or "vacation")
Remember that you can also just put a word or phrase in this field, but that will lead to wrong answers and confusion later on.
Intent Actions
This will be where you set the action that the chatbot will respond with when it hears the right input from the user. There are three action types: Branch to Question, Reply, and Reply with Attachment. Let's cover what each one does. Start with clicking Add Action.
Branch to Question
This option let's you select a question to redirect to based on the listener. Use this if you want to essentially add a listener to a question, since that is not currently supported. For example, let's say I have a "support" question and I want a user to be directed to it when they type "I need customer support." By setting the intent to listen for "customer support", I can then redirect to a question meant to assist the user
Reply
Here you can set a simple reply, with buttons attached. To learn more about buttons and their uses, see Buttons. You will also note the option to "Re-ask Question." By checking this box, after the chatbot has said it's reply, it will then re-ask the last question asked. Some users may find this helpful, but most of the time it is recommended to use Back Buttons.
Reply with Attachment
This is the same as Reply, but you can add an image or video. This could be a product, a person, or any other thing you might want to show a user. Do note however that Reply with Attachment does not let you add buttons. If you want an attachment and buttons, simply use the Add Action button and have two actions.
Save Intent
When you've finished crafting your advanced intent, don't forget to click Save Intent!