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;  ...

Get Building Bots with Microsoft Bot Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.