Book Image

Building Bots with Microsoft Bot Framework

By : Kishore Gaddam
Book Image

Building Bots with Microsoft Bot Framework

By: Kishore Gaddam

Overview of this book

Bots help users to use the language as a UI and interact with the applications from any platform. This book teaches you how to develop real-world bots using Microsoft Bot Framework. The book starts with setting up the Microsoft Bot Framework development environment and emulator, and moves on to building the first bot using Connector and Builder SDK. Explore how to register, connect, test, and publish your bot to the Slack, Skype, and Facebook Messenger platforms. Throughout this book, you will build different types of bots from simple to complex, such as a weather bot, a natural speech and intent processing bot, an Interactive Voice Response (IVR) bot for a bank, a facial expression recognition bot, and more from scratch. These bots were designed and developed to teach you concepts such as text detection, implementing LUIS dialogs, Cortana Intelligence Services, third-party authentication, Rich Text format, Bot State Service, and microServices so you can practice working with the standard development tools such as Visual Studio, Bot Emulator, and Azure.
Table of Contents (10 chapters)

Checking your savings account balance using the bot

In this section, I will explain about how to build a FormFlow to check your savings account balance.

To check your balance, we need an account number and PIN. For that, we will add a class called Balance with two fields: AccountNumber and PIN. Next, we will define a public property for the Balance class in the Customer class, and finally we will append the Balance field to the builder object:

    [Serializable] 
class Balance
{
[Prompt("Please enter your account number")]
public string AccountNumber;
[Prompt("Please enter your pin")]
public string PIN;
};

In the Customer class, define the Savings_Balance property:

            //Savings Account Balance Template  
public Balance Savings_Balance;

Append the Savings_Balance property to the builder object before the OnCompletion method:

 ...