Reputation: 23
RawAPIReponse:
{
"responseId": "0e78ce0c-0953-49fa-9f6d-33c34720cc6d-83ffff32",
"queryResult": {
"queryText": "test",
"parameters": {},
"allRequiredParamsPresent": true,
"fulfillmentText": "This is a text response",
"fulfillmentMessages": [
{
"linkOutSuggestion": {
"destinationName": "ad",
"uri": "https://www.google.be/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"
}
}
],
"intent": {
"name": "projects/healthbot-xsvrws/agent/intents/91d019fd-7594-459a-bb41-281bea75ac1d",
"displayName": "webhook test"
},
"intentDetectionConfidence": 1,
"diagnosticInfo": {
"webhook_latency_ms": 389
},
"languageCode": "en"
},
"webhookStatus": {
"message": "Webhook execution successful"
}
}
Fulfillment Response:
{
"fulfillmentText": "This is a text response",
"fulfillmentMessages": [
{
"linkOutSuggestion": {
"destinationName": "ad",
"uri": "https://www.google.be/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"
}
}
]
}
Fullfillmentstatus:
Webhook execution successful
I m returning webhook response from dotnet mvc api. I have used Google.Cloud.Dialogflow.V2 library.
When i am returning below json its working.
string testResponse = @"{
""fulfillmentText"": ""This is a text response"",
""fulfillmentMessages"": [
{
""card"":
{
""title"": ""card title"",
""subtitle"": ""card text"",
""imageUri"": ""https://assistant.google.com/static/images/molecule/Molecule-Formation-stop.png"",
""buttons"": [
{
""text"": ""button text"",
""postback"": ""https://assistant.google.com/""
}]
}
}]
}";
I want to use suggestion chips in my project. Any help regarding this will be appreciated.
Upvotes: 2
Views: 455
Reputation: 3241
You are sending a linkout suggestion to Dialogflow. Link out suggestions are elements for Google Assistant and these aren't supported in the default simulator of Dialogflow.
If you wish to send a suggestion that you can see in the default simulator, have a look at the suggestion chip in the dialogflow fullfilment library, suggestions in the Dialogflow UI or implement a custom button via custom payloads and load this in your own custom chatbot.
Upvotes: 1