Dialogflow is Google's NLP offering. It supports a wide variety of European and Asian languages. This documentation focuses on how to integrate DialogFlow with Stackchat. To best understand how to use Dialogflow itself, read the full documentation.
Dialogflow has many features, but Stackchat's integration with Dialogflow takes advantage of the following features only:
- intent detection
- entity extraction
- sentiment analysis
In order to connect Dialogflow to Stackchat, you will first need to create a Dialogflow account and then a new Dialogflow Agent.
Create your Dialogflow account and click the arrow under the Dialogflow logo to create your first agent.
Give your agent a name that matches your Stackchat bot's name for ease of understanding. Once your bot has been created, you can connect your Dialogflow agent to Stackchat using a Google Cloud Key ID that is unique to your Dialogflow model.
To find it, go to bot settings and click next to where it says "Service Account".
Then follow these instructions from Dialogflow to start your service account.
In step 7, select the roles Dialogflow API Reader and Dialogflow API Client.
Stop after step 11.
Open the JSON file in a text editor and copy its entire contents to your clipboard and head to Stackchat.
Select the bot you wish to add the Cloud Configuration to and select Integrations. Click Add Integration at the upper right.
In the dialogue on the right, enter a name for your Dialogflow configuration and paste the contents of the Key ID JSON into the field labeled KEY ID and click Add..
Your bot is now linked to a Dialogflow NLP Agent. These steps will need to be repeated for each Dialogflow Agent you wish to use in your bots.
Enabling Sentiment Analysis in Dialogflow
If you're using our Adobe Analytics Cloud Configuration, you may wish to enable sentiment analysis in Dialogflow so that you can report on your audience's sentiment.
Sentiment analysis allows Natural Language Processing to attempt to determine the user's attitude during interaction with your chatbot, and this is currently a beta feature in Dialogflow.
To enable it, go to the settings in your NLP agent and locate the Enable Beta Features slider under the general tab.
Once beta features are enabled, sentiment analysis data will be able to flow into Adobe Analytics and will appear in your Adobe Analytics Report Suite as Prop 11 (Sentiment Score), Prop 12 (Sentiment Magnitude), and Prop 24 (Sentiment Score Range).
At this time, there is no reason to enable this feature unless you are also using Adobe Analytics.