From a261cee1b346aa4a573ec2b9ec0517163b1a1d63 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Fri, 23 Mar 2018 11:24:38 -0700 Subject: [PATCH] Fix Actions on Google v2 list selection event request JSON sample Change-Id: I780e08f93534f7309396d15bdb7ee1bbee755c5a --- .../ActionsOnGoogle/EndConversationEvent.json | 2 +- .../ActionsOnGoogle/ListSelectionEvent.json | 65 ++++++++++++++++--- .../RichResponses/ListResponse.json | 2 +- 3 files changed, 57 insertions(+), 12 deletions(-) diff --git a/requests/v2/ActionsOnGoogle/EndConversationEvent.json b/requests/v2/ActionsOnGoogle/EndConversationEvent.json index 2d42b22..634d3f5 100644 --- a/requests/v2/ActionsOnGoogle/EndConversationEvent.json +++ b/requests/v2/ActionsOnGoogle/EndConversationEvent.json @@ -13,7 +13,7 @@ ], "intent": { "name": "projects/${DIALOGFLOW_PROJECT_ID}/agent/intents/1777d616-a5f7-4838-a9a9-870f2956bd14", - "displayName": "Dialogflow action name of matched intent" + "displayName": "Dialogflow intent name of matched intent" }, "intentDetectionConfidence": 1, "diagnosticInfo": {}, diff --git a/requests/v2/ActionsOnGoogle/ListSelectionEvent.json b/requests/v2/ActionsOnGoogle/ListSelectionEvent.json index 0a1317a..f3d0b50 100644 --- a/requests/v2/ActionsOnGoogle/ListSelectionEvent.json +++ b/requests/v2/ActionsOnGoogle/ListSelectionEvent.json @@ -1,12 +1,57 @@ { - "platform": "ACTIONS_ON_GOOGLE", - "query": "actions_intent_OPTION", - "arguments": { - "input": { - "OPTION": "key of selected item" + "responseId": "ea166558-615a-48f3-ae5b-7f55d895784b", + "queryResult": { + "queryText": "actions_intent_OPTION", + "action": "", + "parameters": {}, + "allRequiredParamsPresent": true, + "fulfillmentText": "", + "fulfillmentMessages": [], + "outputContexts": [ + { + "name": "projects/${PROJECTID}/agent/sessions/${SESSIONID}/contexts/actions_intent_option", + "parameters": { + "OPTION": "key of selected item" + } + } + ], + "intent": { + "name": "projects/${PROJECTID}/agent/intents/1777d616-a5f7-4838-a9a9-870f2956bd14", + "displayName": "Dialogflow intent name of matched intent" }, - "list": [ - "key of selected item" - ] - } -} + "intentDetectionConfidence": 1, + "diagnosticInfo": {}, + "languageCode": "en-us" + }, + "originalDetectIntentRequest": { + "source": "google", + "version": "2", + "payload": { + "isInSandbox": true, + "surface": { + "capabilities": [] + }, + "inputs": [ + { + "rawInputs": [ + { + "query": "Title of selected item", + "inputType": "TOUCH" + } + ], + "arguments": [ + { + "textValue": "Key of selected item", + "name": "OPTION" + } + ], + "intent": "actions.intent.OPTION" + } + ], + "user": {}, + "conversation": {}, + "availableSurfaces": [] + } + }, + "session": "projects/${PROJECTID}/agent/sessions/${SESSIONID}" +} \ No newline at end of file diff --git a/responses/v2/ActionsOnGoogle/RichResponses/ListResponse.json b/responses/v2/ActionsOnGoogle/RichResponses/ListResponse.json index c7f2453..343a0bb 100644 --- a/responses/v2/ActionsOnGoogle/RichResponses/ListResponse.json +++ b/responses/v2/ActionsOnGoogle/RichResponses/ListResponse.json @@ -20,7 +20,7 @@ "items": [ { "optionInfo": { - "key": "first title" + "key": "first title key" }, "description": "first description", "image": {