Skip to main content

How Can I Simulate Buttons with my Azure Bot?

So, there are two very different things to consider here:

  1. How does Botium identify that your Bot wants to show some buttons - this typically works out of the box, Botium recognizes the content types involved in delivering Microsoft Bot Framework content (including Adaptive Cards).
  2. How does your bot backend logic expect that button clicks are happening ? There are several options when programming with the MS Bot Framework.

In most cases, the default Botium configuration works, as it is the way recommended by Microsoft:

In the "activity" delivered to your bot logic, the activity type is "event", and the activity attribute "name" holds the identifier for what button was actually clicked.

https://docs.microsoft.com/en-us/azure/bot-service/nodejs/bot-builder-nodejs-backchannel?view=azure-bot-service-3.0

So this is the default configuration in Botium.

We have seen other implementations, where button clicks are handled by the bot logic the same way as text input - for this, you have to configure Botium to use "message" as the activity type and "text" as the activity value field.

But it actually depends how you implemented it in your bot logic.

Find a description of the involved Botium capabilities in the Github repository for the Botium Directline3 connector.

Was this article helpful?

0 out of 0 found this helpful