I'm using the botframework (enterprise bot template) and LUIS.ai:
My problem is that , when I fill in a custom adaptive card (it has three text input fields) and click submit I get the following message: "I’m sorry, I’m not able to help with that." I can see in the emulator the submit button posts back the entered values, but I'm unsure as to how I listen for the button action.My thoughts are that I have to listen for when the ID of the action is called, but I'm not entirely sure how to do that.
Below is the code that calls the dialog:
public static IMessageActivity SendTicketFormCard(ITurnContext turnContext, dynamic data)
{
var response = turnContext.Activity.CreateReply();
var introcard = File.ReadAllText(@".\dialogs\main\resources\Ticket_Fields.json");
response.Attachments = new List<Attachment>();
response.Attachments.Add(new Attachment()
{
ContentType = "application/vnd.microsoft.card.adaptive",
Content = JsonConvert.DeserializeObject(introcard),
});
return response;
}
Where the JSON dialog looks like so:
{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"horizontalAlignment": "Center",
"size": "Medium",
"weight": "Bolder",
"color": "Dark",
"text": "Search Ticket"
},
{
"type": "TextBlock",
"id": "94358428-5ef2-43a5-9056-d3cac1abfabd",
"text": "Ticket ID:",
"maxLines": 1
},
{
"type": "Input.Text",
"id": "68e1e180-4cdc-4ad6-bb8f-743554f1f58b",
"placeholder": "Ticket ID (required)",
"maxLength": 10
},
{
"type": "TextBlock",
"id": "2da1df9d-7f61-4e5c-9ff9-7aba2c5b306b",
"text": "Summary:",
"maxLines": 1
},
{
"type": "Input.Text",
"id": "403979a3-ccba-4baa-a885-2abca754cc69",
"placeholder": "Summary (optional)",
"maxLength": 250,
"isMultiline": true
},
{
"type": "TextBlock",
"id": "a25464c7-07ea-4270-995f-5e57b783b52d",
"text": "Status:",
"maxLines": 1
},
{
"type": "Input.Text",
"id": "7794d725-feb5-4516-9786-d18684892106",
"placeholder": "Status (optional)",
"maxLength": 30
}
],
"actions": [
{
"type": "Action.Submit",
"id": "783fe2e4-4056-449e-8cc6-5dc9c406222a",
"title": "Search"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0"
}