Skip to content

MahmoudHamdy00/MicroTel-Bot

Repository files navigation

project_img

Contoso-Bot

version 1.0.0

Overview

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.

Built With

Getting Started

Prerequisites

  1. Install Node.js LTS 14.x with npm.
  2. Install .NET Core SDK 3.1 or later.
  3. Install Bot Framework Composer
  4. Install Bot Framework Emulator
  5. Install Visual Studio
  6. Create an Azure SQL Database.
  7. Create Luis.ai Resource.
  8. Create QnA Maker resource.

Installation

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

  1. Configure database

    1. Add the connection string of your Azure SQL Database to your operating system's environment variables.

      1. From your browser, navigate to you Azure SQL Database and fetch your Azure SQL Database connection string.
      2. Update your fetched connection string with your username and password.
      3. Setup an environment variable with the variable name ContosoTel-connectionString and variable value of your fetched connection string.
        connection string img
    2. From your Azure SQL firewall rules, Add your device IP address to the list of authorized IP addresses.

    3. Update database schema

      1. Navigate to your cloned project and open the solution MicroTel_Bot.sln Please make sure to do step 2 before opening the solution.
      2. open the console in Visual Studio, go to the main menu and select Tools > NuGet Package Manager > Package Manager Console command.
      3. Set DatabaseCustomActions as the default project. Default Project img
      4. run this command EntityFrameworkCore\Add-Migration initialCreate.
      5. then run this command EntityFrameworkCore\Update-Database to update the schema of your database.
      6. 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];
      
  2. Launch Bot Framework Composer and use it to open Contoso-Bot solution. composer

  3. Fetch your Luis application Subscription Key and Region.

    1. From your browser, navigate to Microsoft Azure.
    2. Navigate to the LUIS resource that you have created. This resource will be of type: Language Understanding Authoring (LUIS).
    3. Within the selected resource, go to Resource Management -> Keys and Endpoint.
    4. Copy KEY 1. Luis Resouces
  4. Fetch your QnA Maker Subscription key.

    1. From your browser, navigate to Microsoft Azure.
    2. Navigate to the QnA Maker resource that you have created. This resource will be of type: QnA maker.
    3. Within the selected resource, go to Resource Management -> Keys and Endpoint.
    4. Copy KEY 1. QnA Maker Subscription key
  5. Add your previously fetched Luis Subscription Key ,Region and QnA Maker Resource to Bot Framework Composer. luis key

  6. Run solution from Bot Framework composer. run 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.

  7. Test application in Bot Emulator when the run process in done. test bot

    • Clicking on Test in Emulator button will open the bot in Emulator for testing.

Usage

Kindly find the user manual here.

Public to Azure

While we use Microsoft Azure to host Contoso-Bot solution, you can use any cloud provider of choice.

Deployment

Kindly follow this guide to deploy your bot to Azure from Bot Framework Composer.

Build CI/CD Pipeline

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published