I am migrating a Dialogflow agent to API V2, and I am having an issue related to the "Set this intent as end of conversation" option
My fulfillment webhook relies on the "endConversation": true
property of the V1 webhook request's metadata to perform custom platform logic.
Is there any way I can expose this same property in Dialogflow V2 without using a custom payload?
You can look at the queryResult.diagnosticInfo.end_conversation
field in Dialogflow's v2 webhook requests the form of which you can see below:
{
"queryResult": {
"diagnosticInfo": {
"end_conversation": true
},
...
},
...
}
Curiously, this is stored at the agent level. If you export an agent, you'll notice an endIntentIds
key in the agent.json
file, which is an array of IDs of the intents that have this flag set.
I'm not sure why this isn't stored on the intent. Since you have to fully export the agent via the v2 API in order to see agent-level settings, you'll have to do that and then unzip the file in order to determine whether or not this flag is set on an intent.
UPDATE
It turns out that this information is accessible via inbound webhook fulfillment requests. Check out matthewwayne's answer.