Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

as the title, i want to know how to send rich massage like carousel,button ,image,etc to line from dialogflow. i try to fill the costum payload on an intent. but i keep failed to get respond on line.(i do get respond when i check the diagnostic info) my costum payload is just like this..from the dialogflow docs

 {
  "type": "template",
  "altText": "this is a buttons template",
  "template": {
    "type": "buttons",
    "thumbnailImageUrl": "https://example.com/bot/images/image.jpg",
    "title": "Menu",
    "text": "Please select",
    "actions": [
      {
        "type": "postback",
        "label": "Buy",
        "data": "action=buy&itemid=123"
      },
      {
        "type": "postback",
        "label": "Add to cart",
        "data": "action=add&itemid=123"
      },
      {
        "type": "uri",
        "label": "View detail",
        "uri": "http://example.com/page/123"
      }
    ]
  }
}

perhaps its because on diagnostic info (on dialogflow) there was a payload key when i get respnd... ?can i get rid the payload key?..c

 {
        "payload": {
          "template": {
            "imageBackgroundColor": "#FFFFFF",
            "imageSize": "cover",
            "imageAspectRatio": "rectangle",
            "defaultAction": {
              "label": "View detail",
              "type": "uri",
              "uri": "http://example.com/page/123"
            },
            "actions": [
              {

                "type": "postback",
                "label": "Buy",
                "data": "action=buy&itemid=123"
              },
              {
                "label": "Add to cart",
                "data": "action=add&itemid=123",
                "t

thanks for your help :D

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
190 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...