microsoft / BotFramework-Composer

Dialog creation and management for Microsoft Bot Framework Applications
https://docs.microsoft.com/en-us/composer/
MIT License
869 stars 369 forks source link

Webex Adapter AttachementAction Response Unusable #8997

Closed mocalv closed 2 years ago

mocalv commented 2 years ago

Describe the bug

When using adaptive cards with buttons, the response data (turn.activity.value = Webex AttachementAction) is formatted as a dictionary and therefore not unusable for the composer.

Version

image

OS

To Reproduce

Steps to reproduce the behavior:

  1. Open Bot Composer
  2. Create new empty bot
  3. Create "Ask a question"->"Text" Action for "unknown intent" Trigger
  4. Add text and an adaptive card with buttons as attachment to the action
  5. Install Webex adapter under "package manager" and configure it
  6. Install and Configure ngrok to debug locally
  7. debug

Expected behavior

Useable response data when using Webex with adaptive cards and buttons

Screenshots

image

anishprasad01 commented 2 years ago

Thank you for the report. I will investigate.

anishprasad01 commented 2 years ago

Hi @mocalv,

Could you provide me with a screenshot of your Webex configuration in Composer? Please make sure to cover up or remove your secret and token.

mocalv commented 2 years ago

Sure.

I created two webhooks with my bot's access token. The first one is a "All Resource Firehose" Webhook and the second one for the "attachmentActions" resource. Both pointing to the same azure end-point bot URL (xxx.com/api/webex) and same secret and name.

And I can see the responses incoming, when I debug with ngork.

image

For sending the adaptive card I have to use a "dopple json structure", as mentioned in another issue: #https://github.com/microsoft/botbuilder-dotnet/issues/6167#issuecomment-1031130502

anishprasad01 commented 2 years ago

Could you by any chance also provide a sample of how you have set up adaptive cards on Composer for Webex? To be perfectly honest, I am having some trouble following your reproduction steps.

mocalv commented 2 years ago

Sure, here are step three and four with more details:

  1. Create "Ask a question"->"Text" Action for "unknown intent" Trigger grafik

  2. Add text and an adaptive card with buttons as attachment to the action grafik grafik

As mentioned earlyer, for a adaptive card on Comper for Webex you have to use a "dopple json structure". You can use this:

- ```
{
  "$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
  "body":[
    {
      "type":"TextBlock",
      "text":"So let's get started."
    },
    {
      "type":"TextBlock",
      "text":"Currently I am able to help you with the following topics"
    }
  ],
  "actions":[
    {
      "type":"Action.Submit",
      "title":"Encryption",
      "data":{
        "action":"encryption"
      }
    },
    {
      "type":"Action.Submit",
      "title":"Document Classification",
      "data":{
        "action":"classification"
      }
    },
    {
      "type":"Action.Submit",
      "title":"Tools for experts",
      "data":{
        "action":"tools"
      }
    }
  ],
  "type":"AdaptiveCard",
  "version":"1.0",
  "contentType":"application/vnd.microsoft.card.adaptive",
  "content":{
    "$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
    "body":[
      {
        "type":"TextBlock",
        "text":"So let's get started."
      },
      {
        "type":"TextBlock",
        "text":"Currently I am able to help you with the following topics"
      }
    ],
    "actions":[
      {
        "type":"Action.Submit",
        "title":"Encryption",
        "data":{
          "value":{
            "value":"encryption"
          }
        }
      },
      {
        "type":"Action.Submit",
        "title":"Document Classification",
        "data":{
          "value":{
            "value":"classification"
          }
        }
      },
      {
        "type":"Action.Submit",
        "title":"Tools for experts",
        "data":{
          "value":{
            "value":"tools"
          }
        }
      }
    ],
    "type":"AdaptiveCard",
    "version":"1.0"
  }
}```

The created webhooks should look like this: grafik

anishprasad01 commented 2 years ago

It looks like the issue is located in the Webex adapter. Unfortunately, adapters previously integrated with the SDK, like Webex, have been deprecated as of February 7th, 2022. Their ownership has been transferred to the BotBuilder-Community for continued support. You may wish to open a new issue in the appropriate community repository for additional support.