【发布时间】:2021-11-09 07:36:43
【问题描述】:
如何使用自适应卡片操作从自适应卡片获取用户响应。使用 Microsoft Bot Framework 从 MS Teams 频道提交操作?
这是我的示例自适应卡,带有两个按钮是和否。一旦用户单击任何按钮,我需要在使用 Microsoft Bot Framework 4 实现的后端中的机器人应用程序中捕获响应。
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"type": "TextBlock",
"text": "Does this information help you?"
},
{
"type": "ActionSet",
"actions": [
{
"type": "Action.Execute",
"title": "Yes",
"verb": "personalDetailsFormSubmit",
"id": "surveyReplyYes",
"userIds": "" ,
"data":{
"key1": true,
"key2":"okay"
},
"fallback": {
"type": "Action.Submit",
"title": "Yes"
}
},
{
"type": "Action.Execute",
"title": "No",
"verb": "personalDetailsFormSubmit",
"id": "surveyReplyNo",
"userIds": "" ,
"data":{
"key1": false,
"key2":"np"
},
"fallback": {
"type": "Action.Submit",
"title": "No"
}
}
]
}
]
}
【问题讨论】:
标签: botframework chatbot microsoft-teams adaptive-cards