tole
tole

Reputation: 314

How to end session through Dialogflow api v2 webhook response?

I am developing Google Assistant Action (for google home) using the Dialogflow and the API v2 webhooks

I am having trouble finding how to end session!

There was expectUserResponse in API v1, there is shouldEndSession on Alexa, but I can not find anything similar for Dialogflow v2.

Upvotes: 3

Views: 2782

Answers (2)

Thomas Murphy
Thomas Murphy

Reputation: 11

In the Dialogflow console, select the intent you want, and go to the Responses section.

Select Set this intent as end of conversation.

You do not need to specify a response to send back (you can do that in your code as long as Fulfillment is set to Enable webhook call for this intent)

Upvotes: 1

mattcarrollcode
mattcarrollcode

Reputation: 3469

For Dialogflow v2 the expectUserResponse attribute still works for ending a conversation on Actions on Google, its just in a slightly different place (... indicates the rest of your Actions on Google payload):

{
  "fulfillmentMessages": [
    {
      "payload": {
        "expectUserResponse": true,
        ...
      },
      "platform": "ACTIONS_ON_GOOGLE"
    }
  ]
}

Upvotes: 0

Related Questions