首页 > 解决方案 > 结合回复和回发按钮

问题描述

如何在一条消息中组合多种类型的操作按钮(回复和回发)?例子:

{
   "type":"text",
   "text":"The more you know, am I right?  Would you like to learn...",
   "actions":[
      {
         "type":"postback",
         "text":"From a human",
         "payload":"Edu - human"
      },
      {
         "type":"reply",
         "text":"From content",
         "payload":"Edu - content"
      },
      {
         "type":"reply",
         "text":"From your peers",
         "payload":"Edu - community"
      },
      {
         "type":"reply",
         "text":"Something else",
         "payload":"Something else"
      },
      {
         "type":"reply",
         "text":"just to test",
         "payload":"just to test"
      }
   ],
   "role":"appMaker",
   "name":"Flowdev"
}

上面的例子只是没有在 Smooch 聊天中显示。如果我将第一个操作类型更改为回复或将其他三个更改为回发,则会显示该消息。

标签: smooch

解决方案


postback动作可以与其他持久按钮类型 ( link/ buy/etc.) 组合。reply动作不能与持久按钮组合。


推荐阅读