1

I´m a total novice when it comes to dialogflow. My use case is very simple: In the default intent I want to present the user/customer with three different external links (Link Out Suggestions). However, in Dialogflow I can only add one "Link Out Suggestion" in the response section. For Clarity I build this for Google Assistant but also want to be able to use this for example Messenger as well.

Thank you for your input on this question! Br. Ausgar

Ausgar
  • 13
  • 3

1 Answers1

0

You need to create different responses per channel

For Messenger you can add a custom payload to provide for example a button (see below) or even something more sophisticated like cards

{
"facebook": {
 "attachment": {
   "payload": {
    "buttons": [
      {
        "type": "web_url",
        "webview_height_ratio": "tall",
        "url": "www.somewhere.com",
        "title": "Click Here"
      }
    ],
    "template_type": "button",
    "text": "Click a link please"
    },
    "type": "template"
  }
 }
}

For Google Assistant you can do the same, but there are built-in features (Cards) you could possibly use without the need to define the JSON payload

Beppe C
  • 11,256
  • 2
  • 19
  • 41
  • Ok, I added the code above in the custom payload but nothing shows up when i test it. What can be wrong? Also, in your example, there is only one externl link. How do I add additional links? – Ausgar Apr 30 '20 at 07:01
  • Test where? To add more link the JSON includes an array of `buttons`, you can add more – Beppe C Apr 30 '20 at 07:33
  • On the right side of the screen in Dialogflow you have the possibility to run the tests, thats where i test it. – Ausgar Apr 30 '20 at 08:19
  • I see now. You cannot test for Facebook custom payload with the built-in DialogFlow test as it doenst have the Facebook render engine. You can just verify the matched intents and incoming json payload – Beppe C Apr 30 '20 at 08:24
  • Thank you for helping me out Beppe C! Ok, what about the possibility to test this for Google Assistant? There you can open up another test application. Does it get rendered the right way there? – Ausgar Apr 30 '20 at 09:18
  • No problem! I have no experience with Google Assistant, but typically in every channel I use I try to have a test version of my chatbot which I can test as development progress. For Messenger for example I would have test chatbot for my development, different from the one which will serve the end users – Beppe C Apr 30 '20 at 09:35