Dialogflow Intents

Just like your Chatfuel bot comes with a Welcome Message and a Default Message, every Dialogflow agent comes with a Default Welcome Intent and a Default Fallback Intent.

Dialogflow for Chatfuel

What's in an Intent?

There are a number of different ways for you bot to understand the intent of the user when they send you a message. If you open a Dialogflow Intent we can work our way down the page to understand what defines user intent.

Intent Name

You would name your Dialogflow Intents like you would your Chatfuel Blocks. Each Intent name must be unique and it's a good idea to make it descriptive for easy reference. That blue dot represnts a priority status so if you have two intents that conflict because of similar training phrases, click the blue dot and change the priority of one of them.

Dialogflow for Chatfuel

Context

The word "Yes" can be in response to many different questions your bot asks your users. With just keywords in Chatfuel you wouldn't know what a "Yes" response would mean because you wouldn't know the context.

Dialogflow for Chatfuel

Training Phrases

Phrases are the messages that users send to your Chatfuel bot. Rather than use a single keyword, you'll want to have a number of possible phrases that users might say to trigger the same response. It's recommended you have at least 10 different variations of a phrase so that you can train AI to learn how to respond to similar phrases. The Default Welcome Intent captures all the different ways users might say "Get Started" or "Hello" to a chatbot. The AI Starter Kit includes more than 100 hundred different phrases.

Dialogflow for Chatfuel

Events

Events are alternatives to phrases. For example, you could use Dialogflow to ask users questions for a survey and any message they send can trigger an Intent by including a trackable event. You can have events and training phrases as possible inputs to trigger a Dialogflow Intent.

Dialogflow for Chatfuel

Entities

Entities are words within phrases that have different possible meanings or values. For example, if you include the word "Canada" in your phrase, then this will automatically trigger a built-in sys.geo-country entity. Dialogflow recongizes that Canada is a country and therefore you only need one phrase to train your AI to understand that Canada could be any country. Dialogflow has built-in Entities for things like countries, date, and times and you can also create your Entities too with your custom values.

Dialogflow for Chatfuel

Parameters

When you add training phrases and entities are triggered, Dialogflow will create Parameters you can use. A Parameter is just like a User Attribute. It has a value. In fact, Parameter values automatically get saved to User Attributes when the User Attribute matches the Parameter Name in a Dialogflow Intent.

Dialogflow for Chatfuel

Response

The response is how you'll respond to the user. As a Chatfuel bot maker, you'll want to use the Default Response tab in Dialoglow. You can add a text response so that when a user triggers a Dialogflow Intent then you can respond directly with Dialogflow. You can include User Attributes in your text response if you include #janis.YourCustomUserFieldname, or you can respond with a Custom Payload response to redirect back to Chatfuel. A Custom Payload response is a snippet of JSON code. You can even a combination Including a text response in Dialogflow and a Custom Payload response that will respond with Chatfuel.

Dialogflow Text Response for Chatfuel