In the previous botframework article I covered the different types of responses available for the botframework. This article is going to touch on the
Dialog and persisting information between subsequent messages.
So what’s a Dialog?
Dialogs can call child dialogs or send messages to a user. Dialogs are suspended when waiting for a message from the user to the bot. Dialogs are resumed when the bot receives a message from the user.
To create a Dialog, you must implement the
IDialog<T> interface and make your dialog class serializable, something like this:
In the last article about bots I covered creating a basic bot using Microsoft’s botframework, setting up Azure, deploying the bot into Azure, and configuring it to work within Skype.
In this article we’re going to investigate the various response types available to us in the botframework to develop a more rich conversational experience.
Luckily you’re not limited to plain text in a bot conversation; we’re able to embed images, add attachments, give headers and subheaders, add a button or link, tap events for various areas, as well as use markdown to format the main text content.
If you’re not already familiar with Markdown, then get on the case! It means you can very easily write HTML by using a shorthand syntax which can easily be converted to HTML.
I’ve been using it for many years for blogging and general documentation; using pandoc you can even convert markdown to PDF or a Word Doc. Using remark.js or the more recent Marp you can use it to easily create PowerPoint-like presentations
Botframework messages support using this syntax to make the responses more rich. Of course, for this to work, the attached service needs to know how to render the response (and I’ll get on to this later)
At //Build 2016 Microsoft unleashed something known as the Bot Framework; a set of three products to help you build conversational bots and connect them with services, like Slack, Skype, and even Email and SMS.
The Bot Framework has a number of components including the Developer Portal, Bot Builder, and the Bot Directory:
- Developer Portal is where you wire your bot up to existing services like Skype and Slack
- Bot Directory is where you publish your bot to so that others can search for and connect it to their Skype and Slack
- Bot Builder is what you use to implement a more complex and intelligent conversational flow, optionally leveraging the awesome power of some of the Microsoft Research’s Cognitive Services for language interpretation, image recognition, and much more.
In this article I’m going to take you through the process of creating, deploying, and configuring your own Skype bot.