
Announcements
I've been migrating our Bot from Azure to PVA for the last few days. One of the nice features it had was a little "Popular Queries" that showed an Adaptive Card with SelectAction - so clicking on a section redirected rather than having an Action Button.
I wanted to recreate this & have been working on it & wanted to share in case anyone found it useful.
The key part is when you "Ask a Question with Adaptive Card is it looks for the actionSubmitId.
A snippet of my code:
{
"type": "Container",
"spacing": "Medium",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"verticalContentAlignment": "Top",
"items": [
{
"type": "Image",
"url": ***THUMBNAIL***,
"horizontalAlignment": "Center"
}
],
"width": 10
},
{
"type": "Column",
"width": 90,
"spacing": "Small",
"verticalContentAlignment": "Top",
"items": [
{
"type": "TextBlock",
"text": ***TITLE***,
"size": "Medium"
},
{
"type": "TextBlock",
"text": ***SUBTITLE***,
"wrap": true,
"size": "Default",
"spacing": "Small",
"maxLines": 2
}
]
}
]
}
],
"selectAction": {
"type": "Action.Submit",
"title": "ticket",
"data": {
"actionSubmitId": "ticket"
}
},
Final outcome of what user sees:
Clicking on either of these three redirects to the relevant topic for the user.
The key element is the SelectAction within the Container & ensuring you have the data/ActionSubmitId bit.
Hope this helps others & saves them the few hours it took me!