
- Dialogflow - Home
- Dialogflow - Overview
- Dialogflow - Getting Started
- Dialogflow - Components
- Dialogflow - Creating First Agent
- Dialogflow - Creating Parameters
- Dialogflow - Creating Custom Entities
- Dialogflow - Contexts
- Dialogflow - Creating a Custom Intent
- Dialogflow - Training
- Dialogflow - Intent Matching
- Dialogflow - Integration
- Dialogflow - Building a Chatbot
- Dialogflow - Knowledge Base
- Dialogflow Useful Resources
- Dialogflow - Useful Resources
- Dialogflow - Discussion
Dialogflow - Creating a Custom Intent
A custom intent in Dialogflow is a specific action or goal that you create in response to user input. It helps your software or chatbot determine the user's preferences.
For example, saying, "I want to book a flight," allows you to create a new purpose named "Book a Flight." This goal is to ensure that your bot reacts properly when it requests the flight information.
The easiest way to inform your chatbot what to do in response to a certain user statement is to use a custom intent.
How to Create a Custom Intent?
Let us use a car shop agent in this case and we want them to do two tasks −
We want to set up appointments for our clients.
We want to let our customers know about our operating hours.
In order to allow consumers be informed about the vehicle shop's operating hours, we first developed an intent for the customers.
We can achieve this by creating a Dialogflow sample, described below:
User: What time will you be available?
Agent: Our hours of operation are 10 AM to 8 PM every day. Do you need me to do anything else for you?
To create an intent that can manage this Dialogflow we need to perform the following actions −
1. First, we need to create a new Intent and name it Hours.

2. Now, we will go to various training phrases into the hours intent training phrase box. What time will you be open.

3. Next in the Response section, we have to enter the response into the table of the Text response. We are open daily from 09 a.m. until 7 p.m. Is there something else I can do for you?

4. At the end we can click on the Save button to save the Intent we have created.
Add more Training Phrases
Previously, we just provided one training sentence in the Hour intent. That is, "What time will you be open" This goal needs the necessary understanding to identify alternative terms with similar meanings. As a result, we have to add more training phrases to the intent so that the agent can match different types of user terms showing similar intents.
There are multiple ways to phrase the statement in natural language that all convey the same meaning. We offer that each intent start with at least 10-20 training sentences, based on its complexity. When we begin testing an agent, we use Dialogflow's training tool to load fresh training words.
We can offer many options for the user to mention instead of the training sentence "What time will you be open?"
Business Hours
At what time will you close?
Are you open right now?
Are you open tomorrow?
When do you shut down?
What time are you open tomorrow?
How late can I get in?
Are you open today?
Could you please tell me about the opening hours?
To make the above modifications, follow the steps below −
1. First you have to select the 'Hours' intent that we previously created.

2. Then you have to enter the above mention phrases in the our Training phrases section just like below.

3. Now you can save by clicking on the Save button above.
4. Then we need to test the intent we have created using the simulator in the Dialogflow console.

Customize the Fallback Intent
In Dialogflow a Fallback Intent is used when the user's phrases does not match another intent. The fallback intent is named Default Fallback Intent, which is similar to the default welcome intent.
A fallback intent prompts users to structure their phrases in such a way that the agent can easily understand them.
There are several steps to customize the fallback intent you can follow −
1. First we need to click on the Default Fallback Intent.
2. Then, go to Responses.
3. Delete all of the default responses located in the Text response section.
4. Next, add the following training phrase to the Text response section: "Sorry, would you want to learn more about our hours or schedule an appointment?"

5. And at last click on the Save button to save the Fallback Intent.
