Detect intent with sentiment analysis

Note: This feature is currently only available to users of the Enterprise Edition

Sentiment analysis inspects user input
and identifies the prevailing subjective opinion,
especially to determine a user's attitude as positive, negative, or neutral.
When making a detect intent request,
you can specify that sentiment analysis be performed,
and the response will contain sentiment analysis values.

The Natural Language API is used by Dialogflow to perform this analysis.
For more information on that API and documentation on interpreting Dialogflow sentiment analysis results:

Note: In cases where the sentiment analysis score is 0,
the returned sentimentAnalysisResult field will be empty.
If you prefer explicit 0 values in the response,
see the $outputDefaultssystem parameter.

Supported languages

For a list of supported languages, see the sentiment column on the
languages page.
If you request sentiment analysis for an unsupported language,
your detect intent request does not fail,
but the QueryResult.diagnostic_info field contains error information.

Before you begin

Create an agent

The steps in this guide make assumptions about your agent,
so it's best to start with a new agent.
You should delete any existing agent for your project
before creating a new one.
To delete an existing agent: