Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choice Prompts are not translated over to Slack format #3974

Closed
haacked opened this issue May 22, 2020 · 6 comments
Closed

Choice Prompts are not translated over to Slack format #3974

haacked opened this issue May 22, 2020 · 6 comments
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. customer-reported Issue is created by anyone that is not a collaborator in the repository.

Comments

@haacked
Copy link
Contributor

haacked commented May 22, 2020

Version

4.80 (with Microsoft.Bot.Builder.Dialogs v4.9.1

Describe the bug

I wrote a bot that does a sequential conversation flow. When I connect the bot to slack, it renders the choices as text even though Slack supports choice buttons.

The code for my bot is an exact copy of the code from Implement Sequential Conversation Flow.

When I run

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-dialog-manage-conversation-flow?view=azure-bot-service-4.0&tabs=csharp and implement a bot according to the instructions. (In my case, I just copied the code from the samples directory).
  2. Use Azure Bots Channel Registration to connect the bot to Slack per these instructions in the "Configure Slack in Azure" tab.
  3. Make sure to enable interactivity.

Screen Shot 2020-05-22 at 10 08 48 AM

4. Install the bot in the workspace. 5. Say hi to the bot.

Here's what I get.

Screen Shot 2020-05-22 at 9 58 11 AM

Expected behavior

I expected to see buttons for each of the choices.

[bug]

@anusharr anusharr added Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-reported Issue is created by anyone that is not a collaborator in the repository. labels May 25, 2020
@v-kydela
Copy link
Contributor

@haacked - Thank you for the feedback.

Choice prompts will try to render choices as hero cards or suggested actions or text depending on what the channel supports. However, that only applies to Bot Framework channel connector services because the Slack API and the Slack adapter don't know anything about Bot Framework cards or suggested actions. When your choice prompt evaluates the capabilities of the channel, it's assuming you're using the Azure Bot Service.

The ABS Slack channel connector should be your first choice. The adapters should be considered previews and should only be used if you have a good reason to use them and you know what you're doing. If you use the Slack adapter, you won't be able to use Bot Framework cards and that includes the cards generated by choice prompts.

@dmvtech dmvtech added the customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. label May 25, 2020
@dmvtech dmvtech closed this as completed May 25, 2020
@haacked
Copy link
Contributor Author

haacked commented May 25, 2020

When your choice prompt evaluates the capabilities of the channel, it's assuming you're using the Azure Bot Service

@v-kydela I am using Azure Bot Service for my bot. I was a bit confused about how the SlackAdapter plays into everything. I thought the SlackAdapter was used by ABS to translate choices into Slack choices.

So to recap, I am using ABS to connect my bot to Slack. I followed the tutorial exactly. Slack renders the choices as text. I want to confirm, that's not the expected behavior, correct?

@v-kydela
Copy link
Contributor

@haacked - Your title says you're using the Slack adapter. I'm sorry for the confusion, and I will try to make this as clear as possible. If you are using ABS, you should not be using the Slack adapter. If you are using the Slack adapter, you should not be using ABS. ABS and the Slack adapter are incompatible.

If you are unsure of whether you are using the Slack adapter or a Bot Framework adapter, you should be able to see what kind of adapter you have configured in Startup.cs and your controller class. In order to avoid using the Slack adapter, you should completely ignore the instructions in the Slack adapter tab of this page.

I thought the SlackAdapter was used by ABS to translate choices into Slack choices.

That is incorrect. The Slack adapter and ABS are separate and incompatible. You must choose one or the other, and if you have any doubt about which one you want then you should just be using ABS.

I followed the tutorial exactly. Slack renders the choices as text. I want to confirm, that's not the expected behavior, correct?

There are many tutorials out there, but I certainly don't think you could be following any tutorial exactly if you're trying to use both the Slack adapter and ABS.

@haacked haacked changed the title Slack adapter doesn't render choice prompts Choice Prompts are not translated over to Slack format May 25, 2020
@haacked
Copy link
Contributor Author

haacked commented May 25, 2020

Your title says you're using the Slack adapter. I'm sorry for the confusion, and I will try to make this as clear as possible. If you are using ABS, you should not be using the Slack adapter. If you are using the Slack adapter, you should not be using ABS. ABS and the Slack adapter are incompatible.

The title of my issue is incorrect and reflects my earlier confusion. I updated the title. I can confirm I am not using the Slack Adapter. I am using ABS.

There are many tutorials out there

I'm referring to the one I linked to in the write-up for this issue.

So there's two things left for me to understand.

  1. Is the expected behavior I mentioned correct? Should I expect that I get choice buttons in Slack if I followed this tutorial correctly and am using ABS?
  2. If so, can you confirm the issue is not in the Bot Framework and I should open an issue elsewhere?

Thanks!

@v-kydela
Copy link
Contributor

@haacked - Sorry for the misunderstanding. You are correct that this is an actual bug in the .NET SDK, but since I raised the bug nearly a year ago it would be better for you to comment on the issue rather than raising a new one: #2291

Your issue should remain closed. The workaround is to use the HeroCard list style instead of auto: microsoft/BotFramework-Services#82 (comment)

@haacked
Copy link
Contributor Author

haacked commented May 25, 2020

You are correct that this is an actual bug in the .NET SDK, but since I raised the bug nearly a year ago it would be better for you to comment on the issue rather than raising a new one: #2291

Will do! Thanks for pointing me to it. And thanks for the workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. customer-reported Issue is created by anyone that is not a collaborator in the repository.
Projects
None yet
Development

No branches or pull requests

4 participants