Conversation Exits

By default, the Assistant exits your conversation and plays an earcon.
To override this behavior, you can opt-in to receiving one last request that you
can use to cleanup your fulfillment logic and respond to the user one last time.
Your final response must be a single simple response
with a 60-character limit on its textToSpeech and displayText values.

The maximum execution time allowed for conversation exit requests is 2 seconds; if no
response is received, the conversation will end with the default exit earcon.
If your custom cancel response fails (due to exceeding character limit,
improper response type, etc) the conversation will also end with the default exit earcon.

Dialogflow

To receive conversation exit events:

In the left navigation, click the + icon by the Intents menu item.

Give the intent a name and click on the Events section.

Enter actions_intent_CANCEL in the Add event field.

Either specify a response under Response or set up your own response for
this intent in your webhook code.

Enable Set this intent as end of conversation.

Click Save.

In the left navigation, click Integrations.

Choose Google Assistant and click UPDATE DRAFT, then TEST to make
sure the changes are reflected in your project.

When a user requests an conversation exit, the intent you created is triggered and your
response is returned to the user. For
example, here's some fulfillment code that uses the client library to handle a
cancel intent and return a response. Note that the JSON below describes a webhook response.

Actions SDK

To receive conversation exit intents:

In a `conversations` object inside your action package, declare that you want
to receive the `actions.intent.CANCEL` intent whenever a user wants to exit
mid-conversation. Note that the JSON below describes a webhook request.

When you receive a request with the `actions.intent.CANCEL` intent,
clean up any fulfillment logic that you'd like and return an appropriate exit
phrase to the user. For example, here's some fulfillment code that uses the
client library to handle a cancel intent. Note that the JSON below describes a webhook response.
Node.js