Creating an Intent in Dialogflow
Lab Steps
Introduction
Dialogflow uses intents to capture what a user wants out of an interaction. For a banking concierge bot like you are designing there may be intents around “Checking Account Balance” and another for “Transfer money”. In this lab step, you will be designing an intent that will capture a user’s desire to check on their account balance.
Instructions
-
Within the dialog flow screen click Intents from the left-hand menu and then click the CREATE INTENT button near the top-middle of the screen.
This will bring you to the new intent screen.
Intents need a descriptive name that Dialogflow will use to communicate to the backend. It is generally best practice to avoid whitespace.
-
Where it says Intent Name at the top enter check_account_balance.
Intents need to be saved in order to be persisted. This is very different from many google applications which automatically save changes.
-
Click Save.
You also need training phrases in order for Dialogflow to know that a specific intent is being referenced.
-
Under Training Phrases > Add Training Phrase enter the phrase what is the account balance for 32460a into the box Add User Expression.
Note: You may just be presented with the Add User Expression Option from the start depending on your browser, don’t worry if this is the case!
Notice that Dialogflow incorrectly identified the account number as a phone number!
This is because Dialogflow is not familiar with our specific account number format yet. You will need to create a custom entity to fill in here. The entities screen is located on a separate menu so you must first save your partly finished intent. -
Press Save.