Basic Card is not displayed in the Google action simulator console, and also not on my iPhone using google assistant - json

Basic Card is not displayed in the Google action simulator console, and also not on my iPhone using Google Assistant
Here is the JSON code I send :
{
"expectUserResponse": true,
"expectedInputs": [
{
"possibleIntents": [
{
"intent": "actions.intent.TEXT"
}
],
"inputPrompt": {
"richInitialPrompt": {
"items": [
{
"simpleResponse": {
"textToSpeech": "This is a basic card example."
}
},
{
"basicCard": {
"title": "Title: this is a title",
"subtitle": "This is a subtitle",
"formattedText": "This is a basic card. Text in a basic card can include \"quotes\" and\n most other unicode characters including emoji 📱. Basic cards also support\n some markdown formatting like *emphasis* or _italics_, **strong** or\n __bold__, and ***bold itallic*** or ___strong emphasis___ as well as other\n things like line \nbreaks",
"image": {
"url": "https://example.com/image.png",
"accessibilityText": "Image alternate text"
},
"buttons": [
{
"title": "This is a button",
"openUrlAction": {
"url": "https://assistant.google.com/"
}
}
],
"imageDisplayOptions": "CROPPED"
}
}
]
}
}
}
]
}
and here is what I get in the simulator and on the iPhone using Google assistant :
[object Object]
The debug in the simulator returns :
{
"response": "[object Object]",
"expectUserResponse": true,
"conversationToken": "EroCS2w1Tm...",
"audioResponse": "//NExAAAAA...",
"ssmlMarkList": [],
"debugInfo": {
"assistantToAgentDebug": {
"curlCommand": "curl -v https://88.176.64.72:8081/ -H 'Content-Type: application/json;charset=UTF-8' -H 'Google-Actions-API-Version: 2' -H 'Authorization: eyJhbGciOiJSUzI1NiIsImtpZCI6IjM3ODJkM2YwYmM4OTAwOGQ5ZDJjMDE3MzBmNzY1Y2ZiMTlkM2I3MGUiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhdWQiOiJteS10ZXN0LWFwcC1kMTNkZSIsIm5iZiI6MTU1NTI3NTE2OCwiaWF0IjoxNTU1Mjc1NDY4LCJleHAiOjE1NTUyNzU1ODgsImp0aSI6IjVhZWM0ZjAwNzJiNmNjMTcyMDlmZTdiMmJlZDhjZDRlZTI4ZjExYTIifQ.P-SnzkjiWcr-GubTRdT_juTUVAPBn9J6spSRHPqykwsBq3AppsHg2GNBzlDfwhAXbxZAogW-Mdr4k_U2E1cQMGu-fdGnrkkg4UmjGvYz8za5SGaN-OVx3TNYsoayGIgTFn01gmZOIZfI_33-OucZtFSQCHo82YEmK6ypz3kBq5_vGAjdu01cgYEHAXdT6c53LGSEoewhK4F2M-KphlSx3eFYj2yLWJFn7w9w-Yf3W1n5Rm9q9ZGFJ4vNKIZlX0_J-T-6HhB84OX6k9qJYZ8_1FXp6CS9bPOAo_Nid9k1OeONDIJcCwp1GnQTQB4dek77xybmUn5Qo4-ad1IOzHOkNA' -A 'Mozilla/5.0 (compatible; Google-Cloud-Functions/2.1; +http://www.google.com/bot.html)' -X POST -d '{\"user\":{\"userId\":\"ABwppHGZMM6CHA-JcPkrCzVpkgGv953hFvVdAGAEGOWQSETGxFO18zXyIbXrhHAlw63M9Gz7dKcFxn3fIGKd2sw\",\"locale\":\"fr-CA\",\"lastSeen\":\"2019-04-14T20:53:31Z\",\"userStorage\":\"{\\\"data\\\":{}}\"},\"conversation\":{\"conversationId\":\"ABwppHEJaVmbTFuCLu0rK3SBxm_bviFYhyoY6oIa8o3MNqI2gHalTVPumj9cetdIsmtbVlfU-vNhIxBGsYRmWvs\",\"type\":\"ACTIVE\",\"conversationToken\":\"{}\"},\"inputs\":[{\"intent\":\"actions.intent.TEXT\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"image\"}],\"arguments\":[{\"name\":\"text\",\"rawText\":\"image\",\"textValue\":\"image\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.ACCOUNT_LINKING\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"}]}],\"requestType\":\"SIMULATOR\"}'",
"assistantToAgentJson": "{\"user\":{\"userId\":\"ABwppHGZMM6CHA-JcPkrCzVpkgGv953hFvVdAGAEGOWQSETGxFO18zXyIbXrhHAlw63M9Gz7dKcFxn3fIGKd2sw\",\"locale\":\"fr-CA\",\"lastSeen\":\"2019-04-14T20:53:31Z\",\"userStorage\":\"{\\\"data\\\":{}}\"},\"conversation\":{\"conversationId\":\"ABwppHEJaVmbTFuCLu0rK3SBxm_bviFYhyoY6oIa8o3MNqI2gHalTVPumj9cetdIsmtbVlfU-vNhIxBGsYRmWvs\",\"type\":\"ACTIVE\",\"conversationToken\":\"{}\"},\"inputs\":[{\"intent\":\"actions.intent.TEXT\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"image\"}],\"arguments\":[{\"name\":\"text\",\"rawText\":\"image\",\"textValue\":\"image\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.ACCOUNT_LINKING\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.WEB_BROWSER\"}]}],\"requestType\":\"SIMULATOR\"}",
"delegatedRequest": {
"delegatedRequest": ""
}
},
"agentToAssistantDebug": {
"agentToAssistantJson": "{\"conversationToken\":\"{}\",\"expectUserResponse\":true,\"expectedInputs\":[{\"inputPrompt\":{\"initialPrompts\":[{\"textToSpeech\":\"[object Object]\"}],\"noInputPrompts\":[]},\"possibleIntents\":[{\"intent\":\"actions.intent.TEXT\"}]}]}",
"delegatedResponse": {
"delegatedResponse": ""
}
},
"sharedDebugInfoList": []
},
"visualResponse": {
"visualElementsList": [
{
"displayText": {
"content": "[object Object]"
}
}
],
"suggestionsList": [],
"agentLogoUrl": "https://www.gstatic.com/voice/opa/partner_icons/generic_3p_avatar.png",
"agentStyle": {
"primaryColor": "",
"fontFamily": "",
"borderRadius": 0,
"backgroundColor": "",
"backgroundImageUrl": ""
}
},
"clientError": 0,
"is3pResponse": true,
"clientOperationList": [
{
"operationType": 1,
"micUpdatePayLoad": {
"micMode": 1
}
}
],
"projectName": ""
}
Why am I not getting the correct results?
I use Node-Red and the google-action-contrib to make the link beetween ation-on-google and my machine. Everything works fine, I can create a dialog, receive and send sentences... Now, I would like to send a BasicCard (because it seems hat is the correct way to send an image, and many other things, like a button, etc...)
I have put as many datas as possble in this forum, with attached files (wireshark capture, debug information, code):
https://discourse.nodered.org/t/google-action-response-with-an-image-basic-card/10145/7
Thanks for your help

It looks like you're not actually sending the JSON as JSON, but rather you've built an object, and are sending the toString version of it. This is suggested by the part of the response logged that says
"response": "[object Object]"
Without seeing the code you are using to send the response, it is pretty difficult to help further.

I assume you've used the sample code in your action. However, unless you changed the url fields, your action can not find the imageUrl and openUrlAction.
If you change url fields with actual(not "http://example.com") links, your app will respond properly.
Also make sure you've added necessary classes.
e.g.
const { dialogflow, BasicCard, Image, Button } = require('actions-on-google');

Related

Browse Carousel Card not working for google assistant in Dialogflow

I am trying out browse carousel card (in rich responses) feature available for Google Assistant in Google's Dialogflow.
I am getting only simple response as shown:.
Pasted below the Raw API response (no instances of browse carouse card response).
{
"responseId": "ea913388-8753-458c-b033-396512d1af42-e13762d2",
"queryResult": {
"queryText": "show browse carousel",
"parameters": {},
"allRequiredParamsPresent": true,
"fulfillmentMessages": [
{
"platform": "ACTIONS_ON_GOOGLE",
"simpleResponses": {
"simpleResponses": [
{
"textToSpeech": "sample text"
}
]
}
},
{
"platform": "ACTIONS_ON_GOOGLE"
},
{
"text": {
"text": [
""
]
}
}
],
"intent": {
"name": "projects/leafy-winter-268704/agent/intents/bd457567-02c8-4e15-aca7-c32adfcb45f2",
"displayName": "sampleintent"
},
"intentDetectionConfidence": 1,
"languageCode": "en"
}
}
This is the simulator response. The bot is getting disconnected when an intent with browse carousel is triggered.
Am I doing it in the correct way? what can be done to resolve this issue?
The issue is that you're using a Browse Carousel, but attempting to test it with a Smart Display. Smart Displays don't support links, so they can't support the Browse Carousel.
You can switch to testing it with Android and you should be able to see the Browse Carousel.

Go dialogflow sdk WebhookResponse doesn't return the correct json

I'm trying to write a webhook in Go for Dialogflow, I'm using the apiv2 of the official SDK
google.golang.org/genproto/googleapis/cloud/dialogflow/v2
But I can't generate a correct response using the official sdk.
What I mean is that following the documentation and the WebhookResponse struct I can't generate the expected json for the response.
This is the piece of code that I'm using:
response = dialogflow.WebhookResponse{
FulfillmentMessages: []*dialogflow.Intent_Message{
{
Message: &dialogflow.Intent_Message_Card_{
Card: &dialogflow.Intent_Message_Card{
Title: "Title",
Subtitle: "Subtitle",
ImageUri: "https://example.com/images/example.png",
Buttons: []*dialogflow.Intent_Message_Card_Button{
{
Text: "Button",
Postback: "https://example.com/path/for/end-user/to/follow",
},
},
},
},
},
},
}
This is the json that it generates:
{
"fulfillment_messages": [
{
"Message": {
"Card": {
"title": "Title",
"subtitle": "Subtitle",
"image_uri": "https://example.com/images/example.png",
"buttons": [
{
"text": "Button",
"postback": "https://example.com/path/for/end-user/to/follow"
}
]
}
}
}
]
}
But this is the json that I should send back (according to the official documentation)
"fulfillmentMessages": [
{
"card": {
"title": "card title",
"subtitle": "card text",
"imageUri": "https://example.com/images/example.png",
"buttons": [
{
"text": "button text",
"postback": "https://example.com/path/for/end-user/to/follow"
}
]
}
}
]
}
So my json doesn't work, because it has the Message that shouldn't be there, and Card with uppercase first letter. I've tried to send the json of the documentation and it works, Dialog Flow responds correctly.
I don't understand how to generate the correct json using the official SDK. Please consider that I'm pretty new using Go Lang. This is my first project.
This is the documentation that I'm using at the moment:
https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2?tab=doc#WebhookResponse
As you can see the FulfillmentMessages is an array of Intent_Message
FulfillmentMessages []*Intent_Message
And the Intent_Message has to contain Message (here the documentation)
Thanks in advance for any help and suggestions.
H2K
UPDATE:
if I use log.Println(response) I can see the correct response inside the log
fulfillment_messages:{card:{title:"Title" subtitle:"Subtitle" image_uri:"https://example.com/images/example.png" buttons:{text:"Button" postback:"https://example.com/path/for/end-user/to/follow"}}}
It is not a JSON but the structure is correct, no Message, no Card...
So the problem is when I return it with Gin and the command:
c.JSON(200, response)
I've found a solution!
I need to use the jsonpb marshaler and return it as string with Gin
Here an example:
m := jsonpb.Marshaler{}
result, _ := m.MarshalToString(response)
c.String(200, result)
I've totally went crazy on it, I hope that it could be helpful for someone else.

Implicit Invocation of Google Assistant Action App with DialogFlow not working

I'm getting the
"API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: \": Cannot find field.\"."
and so am hoping you can help me, as I cannot get Implicit Invoking working for my app.
I've attached screenshots of the Welcome Intent setup on DialogFLow as well as pasted the Google Cloud fail logs here:
Google Cloud FAIL LOGS:
{
"request": {
"conversationToken": "",
"debugLevel": 1,
"inputType": "KEYBOARD",
"locale": "en-US",
"mockLocation": {
"city": "Mountain View",
"coordinates": {
"latitude": 37.421980615353675,
"longitude": -122.08419799804688
},
"formattedAddress": "Googleplex, Mountain View, CA 94043, United States",
"zipCode": "94043"
},
"query": "ask follow-up to log a call",
"surface": "GOOGLE_HOME"
},
"response": {
"conversationToken": "GidzaW11bG...",
"response": "Follow up isn't responding right now. Try again soon.",
"visualResponse": {
"visualElements": []
}
},
"debug": {
"agentToAssistantDebug": {
"agentToAssistantJson": "{\"message\":\"Failed to parse Dialogflow response into AppResponse, exception thrown with message: Empty speech response\",\"apiResponse\":{\"id\":\"875b123f-bcb2-4f45-b2f4-10193a6132c3\",\"timestamp\":\"2018-01-30T06:33:52.773Z\",\"lang\":\"en-us\",\"result\":{},\"status\":{\"code\":200,\"errorType\":\"success\"},\"sessionId\":\"1517294032097\"}}"
},
"assistantToAgentDebug": {
"assistantToAgentJson": "{\"user\":{\"userId\":\"ABwppHHDarg-rpyAaSt0hm8TZaycr30xhUpQcRKfchRbXriPUKmmzi_BqQrpXInBGyGmgfF4yIEiMX0jInJ8rQ\",\"accessToken\":\"{\\\"access_token\\\":\\\"00D3600000uHY5!AQoAQAcyjXEI.J.5EnB4.R.EdNXBKlymGOI4I6PPJVb465uyQLxnbQDyjPHtD0uE0W1RMdhnhgXLEpr8qPIMOTcnvsfKH0j\\\",\\\"signature\\\":\\\"etNbI3erh1iYmsTqCRicfKKJknRtGnCb1esvufdg7g=\\\",\\\"scope\\\":\\\"refresh_token web api\\\",\\\"instance_url\\\":\\\"https://follow-up-ed.my.salesforce.com\\\",\\\"id\\\":\\\"https://login.salesforce.com/id/00D3600000uHY5EAM/0053600000L9ePAAS\\\",\\\"token_type\\\":\\\"Bearer\\\",\\\"issued_at\\\":\\\"1517293582207\\\"}\",\"locale\":\"en-US\",\"lastSeen\":\"2018-01-30T06:26:14Z\"},\"conversation\":{\"conversationId\":\"151729432097\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"Log Call by Business\",\"rawInputs\":[{\"inputType\":\"VOICE\",\"query\":\"ask follow-up to log a call\"}],\"arguments\":[{\"name\":\"trigger_query\",\"rawText\":\"log a call\",\"textValue\":\"log a call\"},{\"name\":\"Type\",\"rawText\":\"call\",\"textValue\":\"call\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]}]}",
"curlCommand": "curl -v 'https://api.api.ai/api/integrations/google?token=1ee421e5c9504f5b995ce9df62f7d275' -H 'Content-Type: application/json;charset=UTF-8' -H 'Google-Actions-API-Version: 2' -H 'Authorization: eyJhbGciOiJSUzI1NiIsImtpZCI6IjI2YzAxOGIyMzNmZTJlZWY0N2ZlZGJiZGQ5Mzk4MTcwZmM5YjI5ZDgifQ.eyJhdWQiOiJzYWxlc2ZvcmNlLWEwOWVkIiwiYXpwIjoiMTE4NDUyMTUyMjE5LW1zZ2VldXBkaGU5YWp0MzZpNnJxbHJtdTExZGQ1Y2gyLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiZXhwIjoxNTE3Mjk0MTUyLCJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJqdGkiOiI5ZTJjOGI1OGQzZjRiNTc3MmQ0MDc2ZjIwNWIyMGEyYTdmYTQ3MGY3IiwiaWF0IjoxNTE3Mjk0MDMyLCJuYmYiOjE1MTcyOTM3MzJ9.WnIVnDFUESVaLYOITacgDzS_4qPCat8YEMTHgsSzvHUzJNNeZ3oaDqUZ5lwECI0jfp2qHpW7Il5Tv1iDyPScOeggvm2cZZa4OXdr7PLr362eT5wyOZnsFWlrU8n4KlNZsuKl_uMSxhftP0qD2eUuwAKQ0bbAPurApTF_iY8Gzh2V0QYpn1Ol06bJLJo8B9z4lXmFuGfzldjWXojQ1eA794nItQKtt2X7tiSfBOoXOL2fpT8omy293vcMI-dWtf5FY1nH9_bN1GKHCbOQ4LiJTB__r7PVHOcq-SNb9_CtKaXvrLo9EW3CyfnHlc0SGv1UUo9akbvDZEwZG9B3gH7K1g' -A 'Mozilla/5.0 (compatible; Google-Cloud-Functions/2.1; +http://www.google.com/bot.html)' -X POST -d '{\"user\":{\"userId\":\"ABwppHHDarg-rpyAaSt0hm8TZaycr30xhUpQcRKfchRbXriPUKmmzi_BqQrpXInBGyGmgfF4yIEiMX0jInJ8rQ\",\"accessToken\":\"{\\\"access_token\\\":\\\"00D36000000uHY5!AQoAQAcyjXEI.J.5EnB4.R.EdNXBKlymGOI4I6PPJVb465uyQLxnbQDyjPHtD0uE0W1RMdhnhgXL8Epr8qPIMOTcnvsfKH0j\\\",\\\"signature\\\":\\\"etNbI3erh1iYmsTqCRicfKKJknRtGnC4b1esvufdg7g=\\\",\\\"scope\\\":\\\"refresh_token web api\\\",\\\"instance_url\\\":\\\"https://follow-up-dev-ed.my.salesforce.com\\\",\\\"id\\\":\\\"https://login.salesforce.com/id/00D36000000uHY5EAM/00536000000L9ePAAS\\\",\\\"token_type\\\":\\\"Bearer\\\",\\\"issued_at\\\":\\\"1517293582207\\\"}\",\"locale\":\"en-US\",\"lastSeen\":\"2018-01-30T06:26:14Z\"},\"conversation\":{\"conversationId\":\"1517294032097\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"Log Call by Business\",\"rawInputs\":[{\"inputType\":\"VOICE\",\"query\":\"ask follow-up to log a call\"}],\"arguments\":[{\"name\":\"trigger_query\",\"rawText\":\"log a call\",\"textValue\":\"log a call\"},{\"name\":\"Type\",\"rawText\":\"call\",\"textValue\":\"call\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]}]}'"
},
"sharedDebugInfo": [
{
"name": "ResponseValidation",
"subDebugEntry": [
{
"debugInfo": "API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: \": Cannot find field.\".",
"name": "UnparseableJsonResponse"
}
]
}
]
},
"errors": [
[
{
"debugInfo": "API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: \": Cannot find field.\".",
"name": "UnparseableJsonResponse"
}
]
]
}
Google Cloud SUCCESS LOGS:
{
"request": {
"conversationToken": "",
"debugLevel": 1,
"inputType": "KEYBOARD",
"locale": "en-US",
"mockLocation": {
"city": "Mountain View",
"coordinates": {
"latitude": 37.421980615353675,
"longitude": -122.08419799804688
},
"formattedAddress": "Googleplex, Mountain View, CA 94043, United States",
"zipCode": "94043"
},
"query": "Talk to Follow-Up",
"surface": "GOOGLE_HOME"
},
"response": {
"conversationToken": "CiZDIzVhNm...",
"expectUserResponse": true,
"response": "Follow-Up is Online. Would you like to log a call, add a note or create a reminder?",
"visualResponse": {
"visualElements": []
}
},
"debug": {
"agentToAssistantDebug": {
"agentToAssistantJson": "{\"conversationToken\":\"[\\\"defaultwelcomeintent-followup\\\",\\\"sessiondata\\\"]\",\"expectUserResponse\":true,\"expectedInputs\":[{\"inputPrompt\":{\"richInitialPrompt\":{\"items\":[{\"simpleResponse\":{\"textToSpeech\":\"Follow-Up is Online. Would you like to log a call, add a note or create a reminder?\",\"displayText\":\"Follow-Up is Online. Would you like to log a call, add a note or create a reminder in Salesforce?\"}}],\"suggestions\":[{\"title\":\"Log a call\"},{\"title\":\"Add a note\"},{\"title\":\"Create a reminder\"},{\"title\":\"Exit\"}]}},\"possibleIntents\":[{\"intent\":\"assistant.intent.action.TEXT\"},{\"intent\":\"907faabf-33a2-49ff-a368-263d01e812fc\"},{\"intent\":\"a4bdf329-5430-4833-827d-620ed00e4288\"},{\"intent\":\"68d2be51-880d-44dd-9939-1c09089b5fbf\"},{\"intent\":\"d9f56992-363e-410d-a00e-1e9a59ed613d\"},{\"intent\":\"66de3f32-c11a-4e36-80b1-64582bc1ef69\"},{\"intent\":\"befff469-3348-49d7-b9d6-5bbe7eef2aa6\"},{\"intent\":\"a813eeba-2a35-4f20-8fdb-09f8e9b08b7c\"},{\"intent\":\"e9add01c-1067-4c14-a48c-979f4934e192\"},{\"intent\":\"1dbe2f1a-a12e-4f22-9092-11dafce0cf26\"},{\"intent\":\"94c36f7f-8fff-4c55-b6f4-f5556fa83d8a\"},{\"intent\":\"d503d957-6dea-4d40-b161-adb779df2f66\"},{\"intent\":\"040b1388-4aaa-4e3b-8af9-67c111bd9cc7\"},{\"intent\":\"494afd87-d03a-49a6-a5da-340061c9121a\"}],\"speechBiasingHints\":[\"$Classification\",\"$Type\",\"$BusinessName\",\"$Task\",\"$FollowUp\",\"$Calendar\"]}],\"responseMetadata\":{\"status\":{},\"queryMatchInfo\":{\"queryMatched\":true,\"intent\":\"6bb1ee8e-8a54-4422-b20e-de50839c40bc\"}}}"
},
"assistantToAgentDebug": {
"assistantToAgentJson": "{\"user\":{\"userId\":\"ABwppHHDarg-rpyAaSt0hm8TZaycr30xhUpQcRKfchRbXriPUKmmzi_BqQrpXInBGyGmgfF4yIEiMX0jInJ8rQ\",\"accessToken\":\"{\\\"access_token\\\":\\\"00D36000000uHY5!AQoAQAcyjXEI.J.5EnB4.R.EdNXBKlymGOI4I6PPJVb465uyQLxnbQDyjPHtD0uE0W1RMdhnhgXL8Epr8qPIMOTcnvsfKH0j\\\",\\\"signature\\\":\\\"etNbI3erh1iYmsTqCRicfKKJknRtGnC4b1esvufdg7g=\\\",\\\"scope\\\":\\\"refresh_token web api\\\",\\\"instance_url\\\":\\\"https://follow-up-dev-ed.my.salesforce.com\\\",\\\"id\\\":\\\"https://login.salesforce.com/id/00D36000000uHY5EAM/00536000000L9ePAAS\\\",\\\"token_type\\\":\\\"Bearer\\\",\\\"issued_at\\\":\\\"1517293582207\\\"}\",\"locale\":\"en-US\",\"lastSeen\":\"2018-01-30T06:33:52Z\"},\"conversation\":{\"conversationId\":\"1517294128019\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"actions.intent.MAIN\",\"rawInputs\":[{\"inputType\":\"VOICE\",\"query\":\"Talk to Follow-Up\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]}]}",
"curlCommand": "curl -v 'https://api.api.ai/api/integrations/google?token=1ee421e5c9504f5b995ce9df62f7d275' -H 'Content-Type: application/json;charset=UTF-8' -H 'Google-Actions-API-Version: 2' -H 'Authorization: eyJhbGciOiJSUzI1NiIsImtpZCI6IjI2YzAxOGIyMzNmZTJlZWY0N2ZlZGJiZGQ5Mzk4MTcwZmM5YjI5ZDgifQ.eyJhdWQiOiJzYWxlc2ZvcmNlLWEwOWVkIiwiYXpwIjoiMTE4NDUyMTUyMjE5LW1zZ2VldXBkaGU5YWp0MzZpNnJxbHJtdTExZGQ1Y2gyLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiZXhwIjoxNTE3Mjk0MjQ4LCJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJqdGkiOiIxY2M5ODYxOGVlNzI5NzQ4YjdiZTczZmI3NjY2ZDM3YzllYjk0ZDQ4IiwiaWF0IjoxNTE3Mjk0MTI4LCJuYmYiOjE1MTcyOTM4Mjh9.S28YQqlVGJEK0xXfgZ-rxgwdXlfBMBoV3UXBIsvN6SeKK3PYvkvShqpKB5Icr89TSvzS7riq2H9YBwzrvPCRQscrH_3tVRyQL2EsCQhnpGQhnvVdO7rwE2b1-xnoAj7dy9D8EOuNskOK7V2Qek7u-_ZdU9r7w4W_saVwhyFtGMjfXFjgPgRurZq3Ei3-fnZ9GJ-3RqlgGU8FiSSFXheBgSvwWq9Ai7QeiVDaGcjxovX1qZXhkhu9W5lPPdTE1tUYVZ3CZcJfE5YqQiPJfQj6OJwguRg5Qb3aKMHlBV50Pb5Ux302ZWT_L49lVxk-cFM0-oTeNo5YLuFzQIwCgpcaoA' -A 'Mozilla/5.0 (compatible; Google-Cloud-Functions/2.1; +http://www.google.com/bot.html)' -X POST -d '{\"user\":{\"userId\":\"ABwppHHDarg-rpyAaSt0hm8TZaycr30xhUpQcRKfchRbXriPUKmmzi_BqQrpXInBGyGmgfF4yIEiMX0jInJ8rQ\",\"accessToken\":\"{\\\"access_token\\\":\\\"00D36000000uHY5!AQoAQAcyjXEI.J.5EnB4.R.EdNXBKlymGOI4I6PPJVb465uyQLxnbQDyjPHtD0uE0W1RMdhnhgXL8Epr8qPIMOTcnvsfKH0j\\\",\\\"signature\\\":\\\"etNbI3erh1iYmsTqCRicfKKJknRtGnC4b1esvufdg7g=\\\",\\\"scope\\\":\\\"refresh_token web api\\\",\\\"instance_url\\\":\\\"https://follow-up-dev-ed.my.salesforce.com\\\",\\\"id\\\":\\\"https://login.salesforce.com/id/00D36000000uHY5EAM/00536000000L9ePAAS\\\",\\\"token_type\\\":\\\"Bearer\\\",\\\"issued_at\\\":\\\"1517293582207\\\"}\",\"locale\":\"en-US\",\"lastSeen\":\"2018-01-30T06:33:52Z\"},\"conversation\":{\"conversationId\":\"1517294128019\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"actions.intent.MAIN\",\"rawInputs\":[{\"inputType\":\"VOICE\",\"query\":\"Talk to Follow-Up\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]}]}'"
}
},
"errors": []
}
And the DialogFLow JSON blob here:
FAIL DIALOGFLOW
{
"id": "60acafcf-ceb2-485c-b3f6-663407832e1c",
"timestamp": "2018-01-30T06:39:56.632Z",
"lang": "en",
"result": {
"source": "agent",
"resolvedQuery": "ask follow up to log a call",
"action": "input.welcome",
"actionIncomplete": false,
"parameters": {},
"contexts": [
{
"name": "defaultwelcomeintent-followup",
"parameters": {},
"lifespan": 2
},
{
"name": "sessiondata",
"parameters": {},
"lifespan": 1
}
],
"metadata": {
"intentId": "6bb1ee8e-8a54-4422-b20e-de50839c40bc",
"webhookUsed": "true",
"webhookForSlotFillingUsed": "false",
"webhookResponseTime": 340,
"intentName": "Default Welcome Intent"
},
"fulfillment": {
"messages": [
{
"type": "suggestion_chips",
"platform": "google",
"suggestions": [
{
"title": "\"Log a call\""
},
{
"title": "\"Add a note\""
},
{
"title": "\"Create a reminder\""
}
]
},
{
"type": 0,
"speech": "Follow-Up isn't responding right now. Please try again later."
}
]
},
"score": 0.5
},
"status": {
"code": 200,
"errorType": "success",
"webhookTimedOut": false
},
"sessionId": "24069c06-d6c0-4723-a0d9-fa284884d023"
}
SUCCESS DIALOGFLOW
{
"id": "210514e2-6702-4d30-9689-eb3279fdde6d",
"timestamp": "2018-01-30T06:41:19.848Z",
"lang": "en",
"result": {
"source": "agent",
"resolvedQuery": "talk to follow up",
"action": "input.welcome",
"actionIncomplete": false,
"parameters": {},
"contexts": [
{
"name": "defaultwelcomeintent-followup",
"parameters": {},
"lifespan": 2
},
{
"name": "sessiondata",
"parameters": {},
"lifespan": 1
}
],
"metadata": {
"intentId": "6bb1ee8e-8a54-4422-b20e-de50839c40bc",
"webhookUsed": "true",
"webhookForSlotFillingUsed": "false",
"webhookResponseTime": 237,
"intentName": "Default Welcome Intent"
},
"fulfillment": {
"messages": [
{
"type": "suggestion_chips",
"platform": "google",
"suggestions": [
{
"title": "\"Log a call\""
},
{
"title": "\"Add a note\""
},
{
"title": "\"Create a reminder\""
}
]
},
{
"type": 0,
"speech": "Follow-Up isn't responding right now. Please try again later."
}
]
},
"score": 1
},
"status": {
"code": 200,
"errorType": "success",
"webhookTimedOut": false
},
"sessionId": "24069c06-d6c0-4723-a0d9-fa284884d023"
}
Google Actions Testing Logs FAIL
{
"request": {
"conversationToken": "",
"debugLevel": 1,
"inputType": "KEYBOARD",
"locale": "en-US",
"mockLocation": {
"city": "Mountain View",
"coordinates": {
"latitude": 37.421980615353675,
"longitude": -122.08419799804688
},
"formattedAddress": "Googleplex, Mountain View, CA 94043, United States",
"zipCode": "94043"
},
"query": "ask follow up to log a call",
"surface": "GOOGLE_HOME"
},
"response": {
"conversationToken": "GidzaW11bG...",
"response": "Follow up isn't responding right now. Try again soon.",
"visualResponse": {
"visualElements": []
}
},
"debug": {
"agentToAssistantDebug": {
"agentToAssistantJson": "{\"message\":\"Failed to parse Dialogflow response into AppResponse, exception thrown with message: Empty speech response\",\"apiResponse\":{\"id\":\"49c16313-09e6-4431-9765-37095a19e3bb\",\"timestamp\":\"2018-01-31T01:45:41.734Z\",\"lang\":\"en-us\",\"result\":{},\"status\":{\"code\":200,\"errorType\":\"success\"},\"sessionId\":\"1517363140452\"}}"
},
"assistantToAgentDebug": {
"assistantToAgentJson": "{\"user\":{\"userId\":\"ABwppHGKOxCmVg53MPiRI_5NnIt0vUjDf0Hqwxgm9pTNnH8vOquUymEX8T2OtFC1NA48-X4JiKBTk0an2wTYVw\",\"accessToken\":\"{\\\"access_token\\\":\\\"00D36000000uHY5!AQoAQFHFHGAYHInuT1.FtcUSN7k81w1tgkEh.ijyqq1Pw3UqtlCM6SGi_qTrvFDAvPBG673Lgr119bpIUEUNuOnC4XF2d7o2\\\",\\\"refresh_token\\\":\\\"5Aep861QbHyftz0nI9mDOXbILtyhnTRY2lNmFwvaIHwc6w_JBasCpmEoOoWUo5W9asHeibIB9HbomiclZ2P_6pk\\\",\\\"signature\\\":\\\"nUZJxL8SFUVOScLjP6c5ydpjwL8iLRyHZ+xOyehfLhc=\\\",\\\"scope\\\":\\\"refresh_token web api\\\",\\\"instance_url\\\":\\\"https://follow-up-dev-ed.my.salesforce.com\\\",\\\"id\\\":\\\"https://login.salesforce.com/id/00D36000000uHY5EAM/00536000000L9ePAAS\\\",\\\"token_type\\\":\\\"Bearer\\\",\\\"issued_at\\\":\\\"1517363133651\\\"}\",\"locale\":\"en-US\",\"lastSeen\":\"2018-01-31T01:44:48Z\"},\"conversation\":{\"conversationId\":\"1517363140452\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"Log Call by Name\",\"rawInputs\":[{\"inputType\":\"VOICE\",\"query\":\"ask follow up to log a call\"}],\"arguments\":[{\"name\":\"trigger_query\",\"rawText\":\"log a call\",\"textValue\":\"log a call\"},{\"name\":\"Type\",\"rawText\":\"call\",\"textValue\":\"call\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]}]}",
"curlCommand": "curl -v 'https://api.api.ai/api/integrations/google?token=1ee421e5c9504f5b995ce9df62f7d275' -H 'Content-Type: application/json;charset=UTF-8' -H 'Google-Actions-API-Version: 2' -H 'Authorization: eyJhbGciOiJSUzI1NiIsImtpZCI6IjI2YzAxOGIyMzNmZTJlZWY0N2ZlZGJiZGQ5Mzk4MTcwZmM5YjI5ZDgifQ.eyJhdWQiOiJzYWxlc2ZvcmNlLWEwOWVkIiwiYXpwIjoiMTE4NDUyMTUyMjE5LW1zZ2VldXBkaGU5YWp0MzZpNnJxbHJtdTExZGQ1Y2gyLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiZXhwIjoxNTE3MzYzMjYwLCJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJqdGkiOiI5NDQxOTU4YzVkYWY3ZjgyODkzOTdhYWRkNjgzMzNmNDQ1ZjY2NDFkIiwiaWF0IjoxNTE3MzYzMTQwLCJuYmYiOjE1MTczNjI4NDB9.Fc5SWQakdTwfhW3x1NGgbwzT4pjec5GW2fOVc0Vh9aZ8XseAOeMWDRdiVK5Q4ApRMfJWC239P2LYvXGzW2tqZBPjxS_LKdD_6GbRJaNAYMs2SyiTuJmLs0G9RqFzXja-0mz8q_lejpWSuLgjzO7H136lHjR4d6bFiNS0ec3UIzIrgx7oaGCtRFuEtj4af82llyztaKkDAtwpankG01CBWm_sX_FmFD9svLUk7u22NA3KXsCM23fasLcmietBEj6LktnfiR6Tk85mk4n5FYi4VJ7KHzsfgIPC2zkmJVaAc1OczLvV_qtLb_9hoM_3k8jLMXK0n1oypQHZSpCvElOzwQ' -A 'Mozilla/5.0 (compatible; Google-Cloud-Functions/2.1; +http://www.google.com/bot.html)' -X POST -d '{\"user\":{\"userId\":\"ABwppHGKOxCmVg53MPiRI_5NnIt0vUjDf0Hqwxgm9pTNnH8vOquUymEX8T2OtFC1NA48-X4JiKBTk0an2wTYVw\",\"accessToken\":\"{\\\"access_token\\\":\\\"00D36000000uHY5!AQoAQFHFHGAYHInuT1.FtcUSN7k81w1tgkEh.ijyqq1Pw3UqtlCM6SGi_qTrvFDAvPBG673Lgr119bpIUEUNuOnC4XF2d7o2\\\",\\\"refresh_token\\\":\\\"5Aep861QbHyftz0nI9mDOXbILtyhnTRY2lNmFwvaIHwc6w_JBasCpmEoOoWUo5W9asHeibIB9HbomiclZ2P_6pk\\\",\\\"signature\\\":\\\"nUZJxL8SFUVOScLjP6c5ydpjwL8iLRyHZ+xOyehfLhc=\\\",\\\"scope\\\":\\\"refresh_token web api\\\",\\\"instance_url\\\":\\\"https://follow-up-dev-ed.my.salesforce.com\\\",\\\"id\\\":\\\"https://login.salesforce.com/id/00D36000000uHY5EAM/00536000000L9ePAAS\\\",\\\"token_type\\\":\\\"Bearer\\\",\\\"issued_at\\\":\\\"1517363133651\\\"}\",\"locale\":\"en-US\",\"lastSeen\":\"2018-01-31T01:44:48Z\"},\"conversation\":{\"conversationId\":\"1517363140452\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"Log Call by Name\",\"rawInputs\":[{\"inputType\":\"VOICE\",\"query\":\"ask follow up to log a call\"}],\"arguments\":[{\"name\":\"trigger_query\",\"rawText\":\"log a call\",\"textValue\":\"log a call\"},{\"name\":\"Type\",\"rawText\":\"call\",\"textValue\":\"call\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.SCREEN_OUTPUT\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]}]}'"
},
"sharedDebugInfo": [
{
"name": "ResponseValidation",
"subDebugEntry": [
{
"debugInfo": "API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: \": Cannot find field.\".",
"name": "UnparseableJsonResponse"
}
]
}
]
},
"errors": [
[
{
"debugInfo": "API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: \": Cannot find field.\".",
"name": "UnparseableJsonResponse"
}
]
]
}
Google Cloud Logs SUCCESS Post
{
insertId: "epw74xfuhr98a"
labels: {
channel: "preview"
source: "JSON_RESPONSE_VALIDATION"
}
logName: "projects/salesforce-a09ed/logs/actions.googleapis.com%2Factions"
receiveTimestamp: "2018-01-31T02:07:08.026897050Z"
resource: {
labels: {
action_id: ""
project_id: "salesforce-a09ed"
version_id: ""
}
type: "assistant_action"
}
severity: "DEBUG"
textPayload: "Sending request with post data: {"user":{"userId":"ABwppHGKOxCmVg53MPiRI_5NnIt0vUjDf0Hqwxgm9pTNnH8vOquUymEX8T2OtFC1NA48-X4JiKBTk0an2wTYVw","accessToken":"{\"access_token\":\"00D36000000uHY5!AQoAQPlRWyuv4mA0oNyUUcUWBr1PRzsaQB0NGFR3f9CD6j4Z_vHGSHCcRtGyOet5F_jEdvo.ykj1es.d2y.d7lFwanc1x1en\",\"refresh_token\":\"5Aep861QbHyftz0nI9mDOXbILtyhnTRY2lNmFwvaIHwc6w_JBZrL0KU0BZ3nLp.5Q1bBdSVn.zL53m3QsG0ZW1J\",\"signature\":\"UncpON0wsMm9OfoudbJw4liWBdWktyCat6lxArAO3iU=\",\"scope\":\"refresh_token web api\",\"instance_url\":\"https://follow-up-dev-ed.my.salesforce.com\",\"id\":\"https://login.salesforce.com/id/00D36000000uHY5EAM/00536000000L9ePAAS\",\"token_type\":\"Bearer\",\"issued_at\":\"1517364271309\"}","locale":"en-US","lastSeen":"2018-01-31T02:05:39Z"},"conversation":{"conversationId":"1517364426179","type":"NEW"},
"inputs":[{"intent":"actions.intent.MAIN","rawInputs":[{"inputType":"VOICE","query":"open follow-up"}]}],
"surface":{"capabilities":[{"name":"actions.capability.MEDIA_RESPONSE_AUDIO"},{"name":"actions.capability.AUDIO_OUTPUT"}]},"isInSandbox":true,"availableSurfaces":[{"capabilities":[{"name":"actions.capability.SCREEN_OUTPUT"},{"name":"actions.capability.AUDIO_OUTPUT"}]}]}."
timestamp: "2018-01-31T02:07:06.435444389Z"
trace: "projects/118452152219/traces/1517364426179"
}
Google Cloud Logs FAIL Post
{
insertId: "5kahhnfa51fzb"
labels: {
channel: "preview"
source: "JSON_RESPONSE_VALIDATION"
}
logName: "projects/salesforce-a09ed/logs/actions.googleapis.com%2Factions"
receiveTimestamp: "2018-01-31T02:08:18.510485438Z"
resource: {
labels: {
action_id: ""
project_id: "salesforce-a09ed"
version_id: ""
}
type: "assistant_action"
}
severity: "DEBUG"
textPayload: "Sending request with post data: {"user":{"userId":"ABwppHGKOxCmVg53MPiRI_5NnIt0vUjDf0Hqwxgm9pTNnH8vOquUymEX8T2OtFC1NA48-X4JiKBTk0an2wTYVw","accessToken":"{\"access_token\":\"00D36000000uHY5!AQoAQPlRWyuv4mA0oNyUUcUWBr1PRzsaQB0NGFR3f9CD6j4Z_vHGSHCcRtGyOet5F_jEdvo.ykj1es.d2y.d7lFwanc1x1en\",\"refresh_token\":\"5Aep861QbHyftz0nI9mDOXbILtyhnTRY2lNmFwvaIHwc6w_JBZrL0KU0BZ3nLp.5Q1bBdSVn.zL53m3QsG0ZW1J\",\"signature\":\"UncpON0wsMm9OfoudbJw4liWBdWktyCat6lxArAO3iU=\",\"scope\":\"refresh_token web api\",\"instance_url\":\"https://follow-up-dev-ed.my.salesforce.com\",\"id\":\"https://login.salesforce.com/id/00D36000000uHY5EAM/00536000000L9ePAAS\",\"token_type\":\"Bearer\",\"issued_at\":\"1517364271309\"}","locale":"en-US","lastSeen":"2018-01-31T02:08:07Z"},"conversation":{"conversationId":"1517364498025","type":"NEW"},
"inputs":[{"intent":"ReminderIntent","rawInputs":[{"inputType":"VOICE","query":"ask follow up to create a reminder"}],"arguments":[{"name":"trigger_query","rawText":"create a reminder","textValue":"create a reminder"},{"name":"Task","rawText":"creates","textValue":"create"},{"name":"Task","rawText":"reminders","textValue":"reminder"}]}],
"surface":{"capabilities":[{"name":"actions.capability.AUDIO_OUTPUT"},{"name":"actions.capability.MEDIA_RESPONSE_AUDIO"}]},"isInSandbox":true,"availableSurfaces":[{"capabilities":[{"name":"actions.capability.AUDIO_OUTPUT"},{"name":"actions.capability.SCREEN_OUTPUT"}]}]}."
timestamp: "2018-01-31T02:08:18.282416932Z"
trace: "projects/118452152219/traces/1517364498025"
}
Screen shots:
DialogFlow Welcome Intent
DialogFlow LogCall Intent
DialogFlow / Assistant Integration Tab
Google Actions Simulator error
Google Cloud Error Logs
The issue is because the intent you are trying to match "Log call by name" which expects an input context "sessionData", will never be matched because invoking your app using a deep-link "ask follow up to log a call" doesn't send that context in the request. That explains why your default response (Text response) for that intent isn't returned.
To fix it you need to:
Remove the input contexts from the intents you intend to use as deep-links OR duplicate those intents and remove the input contexts from the duplicates.
Best practice 1: Have a fallback intent that has no input contexts, which will catch any unmatched in-dialog queries.
Best practice 2: Have a fallback intent that specifically handles unmatched deep-links at invocation time. (See image below)
The agentToAssistantJson field has an encoded JSON entry for result which typically suggests that your webhook isn't returning anything. Normally, Dialogflow returns the static messages you've defined in the Intent in this case, but it sounds like that isn't happening here. Verify that the URL you're using for fulfillment is correct and that it is returning valid JSON.
In this case, I think there are a few things that could be causing the problem.
The phrase "Ask follow up to log a call" should be triggering the Log Call by Name Intent it looks like. But this Intent isn't listed as one of the implicit invocation Intents. The Assistant might be passing this off to Dialogflow, and Dialogflow, finding no match, returns nothing.
But even if it did match the phrasing for the Log Call by Name Intent, and that Intent was an implicit invocation Intent, there are two other elements of the Intent that seem strange.
The first is that the Intent is expecting an input context of sessionData. But since this is meant to be used as an initial Intent, there can be no input context. Dialogflow may be told by the Assistant that this is the matching Intent, and then reject it because the input context doesn't match.
Similarly, the second oddity is that you're looking for an event called CALL_BY_NAME. Events generally override any phrases that may be spoken - they're meant to capture non-textual activities (the WELCOME intent, for example, or an option being selected, or the user saying nothing). Unless you're triggering the event (which you can do), you probably wouldn't want it. As above, I'm wondering if the Assistant is telling Dialogflow this is the Intent to use, but Dialogflow isn't getting the event, so rejects it and sends back nothing.
tl;dr
There are three possible things to look at and fix:
Make sure the Intent is listed as an implicit invocation Intent in the Assistant Integration.
Remove the incoming context.
Remove the event.

MediaWiki API Incorrect User Rights

I'm battling with the WikiEditor extension of MediaWiki 1.27. When a user tries to use the fancy image upload button from the enhanced editor toolbar, I get the message "You must be logged in to upload files."
So far I've narrowed it down to the user rights returned from the API being incomplete. I've tested with the following two API calls:
The one WikiEditor uses: action=query&meta=userinfo&uiprop=rights
returns:
{
"batchcomplete": "",
"query": {
"userinfo": {
"id": 1006,
"name": "john_smith",
"rights": [
"read",
"createpage",
"createtalk",
"writeapi",
"editmyusercss",
"editmyuserjs",
"viewmywatchlist",
"editmywatchlist",
"viewmyprivateinfo",
"editmyprivateinfo",
"editmyoptions",
"autocreateaccount"
]
}
}
}
However, this API call: action=query&list=users&ususers=john_smith&usprop=rights returns:
{
"batchcomplete": "",
"query": {
"users": [
{
"userid": 1006,
"name": "john_smith",
"rights": [
"block",
"createaccount",
"delete",
"bigdelete",
"deletedhistory",
"deletedtext",
"undelete",
"editinterface",
"editusercss",
"edituserjs",
"editcontentmodel",
"import",
"importupload",
"move",
"move-subpages",
"move-rootuserpages",
"move-categorypages",
"patrol",
"autopatrol",
"protect",
"editprotected",
"rollback",
"upload",
"reupload",
"reupload-shared",
"unwatchedpages",
"autoconfirmed",
"editsemiprotected",
"ipblock-exempt",
"blockemail",
"markbotedits",
"apihighlimits",
"browsearchive",
"noratelimit",
"movefile",
"unblockself",
"suppressredirect",
"mergehistory",
"managechangetags",
"deleterevision",
"read",
"createpage",
"createtalk",
"writeapi",
"editmyusercss",
"editmyuserjs",
"viewmywatchlist",
"editmywatchlist",
"viewmyprivateinfo",
"editmyprivateinfo",
"editmyoptions",
"autocreateaccount",
"edit",
"minoredit",
"purge",
"sendemail",
"applychangetags",
"changetags"
]
}
]
}
}
I'm totally stumped and at a loss of why these two very similar API calls return a different set of rights. As a result, users are not able to upload images via the enhanced editor button.

Generate POSTMAN in webpage with JSON or something

I have a restAPI code from a programmer from JNE, company stands for delivery service.
They say that this API can be run in POSTMAN (Google Chrome Application)
It works fine in the POSTMAN, where in this application I just need to insert the request URL (which I have got from the JNE company) and two header of keys and values as follow;
KEY VALUE
----------------------------------------------
username mycompany
api key 4534645756864234523424
The method for this is POST and when I posted it, it gives me the results as how expected.
My problem now is, how can I run this code in my page, so that I don't need to run this in postman.
I am just this day going to learn JSON if anybody can help me out with this.
[UPDATE QUESTION 1]
{
"version":1,
"collections":
[
{
"id":"c8b12431-8586-cbdd-aef7-056ec177509a",
"name":"asdasdadasdasdasd",
"timestamp":1415593872130,
"requests":
[
{
"collectionId":"c8b12431-8586-cbdd-aef7-056ec177509a",
"id":"d1b2ed66-781d-d02e-c4eb-0416dd3e07a1",
"name":"http://api.jne.co.id:8889/tracing/mycompany/origin/key/jak",
"description":"",
"url":"http://api.jne.co.id:8889/tracing/mycompany/origin/key/jak",
"method":"POST",
"headers":"username: mycompany\napi_key:089a12ffb8cd5009bdfa4ba5bdb9ee26\n",
"data":
[
{
"key":"username",
"value":"mycompany",
"type":"text"
},
{
"key":"api_key",
"value":"dsfsdfsdfs98d98sdfsdf9898dsfs",
"type":"text"
}
],
"dataMode":"params",
"timestamp":0,
"responses":[],
"version":2
}
]
}
],
"environments":[],
"headerPresets":[],
"globals":[]
}
From the update question above; my first question is: ]
In what format I have to save this file: JSON? or WHAT?
Should I save this file in one file with my webpage? or Can I save it as external file?
From the code above, I get the result as follow:
{
"detail": [
{
"code": "CGK10000",
"label": "JAKARTA"
},
{
"code": "CGK10100",
"label": "JAKARTA BARAT"
},
{
"code": "CGK10300",
"label": "JAKARTA PUSAT"
},
{
"code": "CGK10200",
"label": "JAKARTA SELATAN"
},
{
"code": "CGK10500",
"label": "JAKARTA TIMUR"
},
{
"code": "CGK10400",
"label": "JAKARTA UTARA"
}
]
}
If you have a look to the "label" it is generated from the key of the last string in the: "name":"http://api.jne.co.id:8889/tracing/mycompany/origin/key/jak",
The result of the label from the last string of jak, is what I want to insert in a dropdown html tag, in where the user will choose that (the name of the location).
[Update with complete code]
POST /tracing/mycompany/origin/key/jak HTTP/1.1
Host: api.jne.co.id:8889
Content-Type: application/json
username: mycompany
api_key: 089a12ffb8cd5009bdfa4ba5bdb9ee26
{
"version":1,
"collections":
[
{
"id":"c8b12431-8586-cbdd-aef7-056ec177509a",
"name":"asdasdadasdasdasd",
"timestamp":1415593872130,
"requests":
[
{
"collectionId":"c8b12431-8586-cbdd-aef7-056ec177509a",
"id":"d1b2ed66-781d-d02e-c4eb-0416dd3e07a1",
"name":"http://api.jne.co.id:8889/tracing/mycompany/origin/key/jakarta",
"description":"",
"url":"http://api.jne.co.id:8889/tracing/mycompany/origin/key/jakarta",
"method":"POST",
"headers":"username: mycompany\napi_key:089a12ffb8cd5009bdfa4ba5bdb9ee26\n",
"data":
[
{
"key":"username",
"value":"mycompany",
"type":"text"
},
{
"key":"api_key",
"value":"089a12ffb8cd5009bdfa4ba5bdb9ee26",
"type":"text"
}
],
"dataMode":"params",
"timestamp":0,
"responses":[],
"version":2
}
]
}
],
"environments":[],
"headerPresets":[],
"globals":[]
}
I have saved this file as jne.json and jne.html but the browser just show the full code insted show the result as how the postman does. I think there are many things I am missing here.
The POST request would look something like the following
POST /tracing/mycompany/origin/key/jak HTTP/1.1
Host: api.jne.co.id:8889
Content-Type: application/json
username: mycompany
api_key: 089a12ffb8cd5009bdfa4ba5bdb9ee26
{
... your JSON ...
}
You can save JSON with the .json file extension. If your request is always the same you can save this file with your webpage, but normally an HTTP request is constructed before sending (that means you normally send different requests).
To fill the dropdown list you just have to parse the JSON response.