Creating bots with the Bot Framework Composer

On some of our courses we teach people how to create bots. E.g. in the Teams Development course we create some bots for using in Teams, using the Azure Bot Framework or using Power Virtual Agents (which makes creating bots a breeze). We now have a third option: the Bot Framework Composer. This is another way to create bots without code. The difference with the Power Virtual Agents, is that the agents are using Power Automate for doing stuff. Of course, this is only an option if you're having an Office/Microsoft 365 account. The Composer is using another approach, some parts similar to the virtual agents, but actions are different. I will just create a simple example here to give you a taste. Let's create a bot for buying something. When creating a bot you get the welcome greeting for free.


The ${WelcomeUser()} is pointing to the Bot Responses, which you can find on the left. The message can be found underneath Common, and can be changed there.


Responding to the user can be done by adding triggers, similar to the virtual agents. Let's start by responding when we don't know what the user wants by responding to an unknown intent.

/2021/1/Blog3.jpg /2021/1/Blog4.jpg

Now let's respond to the user wanting to buy something. We add "Intent Recognized" as a trigger this time. You also need to specify phrases to respond to.


In here we will just ask what the user wants to buy. Different types of questions can be asked here. The response is stored in a variable. In this case the variable is something to be stored at the user level, so we'll put it in user.product.

/2021/1/Blog6.jpg /2021/1/Blog7.jpg

There are multiple ways of displaying the options, like Cards, but here we'll keep it simple. Based upon the choice we can now start doing conditional actions with e.g. If-Then or Switch statements. And of course, we can call external services, call knwoledgebases created by the QnA maker and more. In here I'll just call a rest service for getting a price.


Just a simple example for starters, for giving you a taste of this bot-creating approach.