NLU chatbots are getting popular among the businesses because they provide a better understanding of the websites, applications, etc. to the users. Companies train their bot on natural language to provide customer support at all times. Moreover, it boosts user engagement through smooth user interaction experience and gives them quick access to all the app or website’s services. Additionally, an intelligent bot can give proper recommendations to the users and help them in their essential tasks. For instance, Alexa and Siri are great examples of smart voice bots.

  1. What is Dialogflow?
  2. Creating an Agent
  3. Configuring an Agent
  4. Creating an Intent for Agent
  5. Training an Agent
  6. Services for an Intent
  7. Action & Parameters
  8. Data Extraction

Dialogflow Chatbot

What is Dialogflow?

Dialogflow is Google’s chatbot platform for creating conversational AI systems that work on natural language processing. Dialogflow has Machine Learning as its backbone implementation. These systems include the IVR system, chatbots, and voice bots, trained in many languages.

In this step-by-step tutorial, the user will be building a chatbot for a tech-solutions company using Dialogflow.

Creating an Agent

1. Starts by logging into using the Gmail account and click on the Console to get to the main Dialogflow page.

2. Click on the Create Agent button to create an agent.

Dialogflow Chatbot

3. An agent is a term to refer a bot. In this tutorial, the user names his agent as Avatar. The agent name can have no spaces. A bot requires a primary language and default time zone in order to function. In this case, the parameters are English and (GMT+5:00) Asia, respectively. Users can now click on the Create button to create an agent.

Configuring an Agent

1. After creating the agent, an Intent screen appears before the user. Intents categorize the user’s expressions and map it to the appropriate bot action. It is essential to know the basic conversation flow of a chatbot to understand the concept of intents. It starts with the user giving a voice or typed input to the bot; the bot parses it to understand the user’s intention and return the appropriate response accordingly.

2. In this flow, intents play the role of matching the input to the pre-trained phrases and returning responses.

Dialogflow Chatbot Tutorial

Creating an Intent for Agent

1. The picture above shows the two intents: Default Fallback Intent and Default Welcome Intent. These two intent gets triggered when the user types in “Hello.” The user starts by creating a custom intent by pressing the Create Intent button at the top right.

2. Provide a name to newly created intent. In this tutorial, the user is making a simple bot for a tech solutions company. The name for the current intent is company_intent, which will be trained to give the company’s introduction to the bot users. Furthermore, different sections are to required to create an intent. Section details are:

    • Context: It links the different intents together and carries the required information to other intents.
    • Event: Events trigger the intent from within, without any input from the user.
    • Training Phrases: The user provides some training phrases for the bot’s intent to look for them in the input expression to invoke a specific intent.

3. Context and events can be given any name, as they are not used or coupled with any entity over the process.

Dialogflow Chatbot for Beginners

Training an Agent

1. Click on the training phrase to open up this section and write down some expressions for this intent. In this case, the user wants this intent to be trained in terms of introductory words. The trained phrases can be as follow:

    • Your services
    • Purpose of the company

Whenever the user says query the bot like “tell me about your services,” this intent will be invoked.

Dialogflow Chatbot Explained

2. The user can see a section for text responses below the training phrases. Users can add more than one response to an intent. Based on multiple responses configured against an intent, the bot will randomly choose one of them to reply to the user.

3. Moreover, there is a toggle button below the response section, which says: “Set this intent as the end of the conversation.” The user can enable it to mark some response as the end of the conversation, for instance, Goodbye.

Dialogflow Chatbot 101

4. Press the Save button to save the intent. Then write the sentences containing the training phrases in the bot interface at the right, and the bot will return a text response accordingly.

Dialogflow Chatbot Advanced

Services for an Intent

1. The intents above explained the uses of intents to give a response to the users. However, they cannot extract useful information from the user input. Entities help to extract the data such as dates, numbers, ages, from the user’s expression to give an appropriate reply. For instance, if a company provides various services, and a user asks about a particular service, the agent needs to extract that service’s name from the user’s text.

2. An entity can be created for the services to extract data from the user-provided information. Users can create an entity by clicking the Create Entity For this example, the name will be “services.”

3. Add the names of all the services provided by the company and their synonyms in each row. The agent is case sensitive, so the user should add the words in both cases, i.e., lower and upper case, to make sure all the user input bases are available by intent. Once things are in order, press Save to continue.

Dialogflow Chatbot Account

4. Create an intent and name it “Services.” The user can add additional training phrases from available services. In most cases, the agent itself highlights the entities relevant to its name; however, there is an option to check out the available services as per the requirement.

Dialogflow Chatbot Tools

Action & Parameters

1. Moreover, the Action and parameters section below will start showing the parameter names and values immediately. The user will have to select the “Required” as the agent needs the service name to provide a valid response to the customer’s query.

Dialogflow Account

2. Click on the prompts to add, “Please be specific about the services. Thank you“, to ask the user to mention the service about which he needs information. With this, whenever a user inquires about the service’s details without specific service information, the agent will respond with “Please be specific about the services. Thank you.”


Data Extraction

1. When the bot extracts the data from the customer’s input, the entity can use the relevant in the responses by using the ‘$’ sign with the entity name. For instance, the bot can be configured to respond with, “This $services includes ……” to describe the services.

2. In this scenario, the user writes the “$services” in the response section and tests it in the bot interface.

3. Once the intent is saved and trained appropriately, a test can be performed over the bot to see how it operates. For a sample, the customer queries the bot by asking, “Tell me something about your marketing services.” The bot will store the “marketing services” as an entity and respond accordingly.

The above samples show a fundamental Avatar agent that is capable of introducing the company and talking about its services. There are a lot of complex avatars that can be build using similar techniques and are quite sufficient to boost customer service and support through an automated and efficient approach.