version 1.0.0
Contoso-Bot is an enterprise-grade Customer Support sample solution directed towards the Telecommunications industry. The bot is built with LUIS, Bot Framework (Composer), and Azure SQL Server.
Customers may use Contoso-Bot to sign up for new phone lines, inquire about their current quota, or bill, manage their phone line options, learn about company policies and promotions, and cancel their subscription at any time.
- Install Node.js LTS 14.x with npm.
- Install .NET Core SDK 3.1 or later.
- Install Bot Framework Composer
- Install Bot Framework Emulator
- Install Visual Studio
- Create an Azure SQL Database.
- Create Luis.ai Resource.
- Create QnA Maker resource.
- Clone Contoso-Bot repository to your local machine
git clone https://github.com/ahmedmeshref/Contoso-Bot.git
Note: Please make sure to clone your repostory in a folder with a short path.
-
Configure database
-
Add the connection string of your Azure SQL Database to your operating system's environment variables.
- From your browser, navigate to you Azure SQL Database and fetch your Azure SQL Database connection string.
- Update your fetched connection string with your username and password.
- Setup an environment variable with the variable name
ContosoTel-connectionString
and variable value of your fetched connection string.
-
From your Azure SQL firewall rules, Add your device IP address to the list of authorized IP addresses.
-
Update database schema
- Navigate to your cloned project and open the solution
MicroTel_Bot.sln
Please make sure to do step 2 before opening the solution. - open the console in Visual Studio, go to the main menu and select Tools > NuGet Package Manager > Package Manager Console command.
- Set
DatabaseCustomActions
as the default project. - run this command
EntityFrameworkCore\Add-Migration initialCreate
. - then run this command
EntityFrameworkCore\Update-Database
to update the schema of your database. - go to your database and and run these queries to check weather the tables was created with initial data successfully or not (it should return some records (the available tiers and extra packages))
SELECT * from extra_package_details ; SELECT * FROM [tier_details];
- Navigate to your cloned project and open the solution
-
-
Launch Bot Framework Composer and use it to open Contoso-Bot solution.
-
Fetch your Luis application Subscription Key and Region.
- From your browser, navigate to Microsoft Azure.
- Navigate to the LUIS resource that you have created. This resource will be of type: Language Understanding Authoring (LUIS).
- Within the selected resource, go to Resource Management -> Keys and Endpoint.
- Copy KEY 1.
-
Fetch your QnA Maker Subscription key.
- From your browser, navigate to Microsoft Azure.
- Navigate to the QnA Maker resource that you have created. This resource will be of type: QnA maker.
- Within the selected resource, go to Resource Management -> Keys and Endpoint.
- Copy KEY 1.
-
Add your previously fetched Luis Subscription Key ,Region and QnA Maker Resource to Bot Framework Composer.
-
Run solution from Bot Framework composer.
Note: If you get the following error
Cannot open server ‘myserverluis’ requested by the login. Client with IP address ‘167.220.197.236’ is not allowed to access the server. To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range. It may take up to five minutes for this change to take effect.
, move the project directory to a shorter path. -
Test application in Bot Emulator when the run process in done.
- Clicking on
Test in Emulator
button will open the bot in Emulator for testing.
- Clicking on
Kindly find the user manual here.
While we use Microsoft Azure to host Contoso-Bot solution, you can use any cloud provider of choice.
Kindly follow this guide to deploy your bot to Azure from Bot Framework Composer.
CI/CD helps you to easily and quickly deploy new versions of your bot. Follow this guide to build a CI/CD pipeline for Contoso-Bot.
Note: The YAML files required for building an azure CI/CD pipeline can be found in Contoso-Bot's main directory here.