Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WSDA and version DigitalAgent2.1

Table of Contents

...

Perform the following steps to build a Microsoft Teams bot app via the Microsoft Teams Developer Portal.

  1. Find and add Developer Portal to your Microsoft Teams.
    1. Launch and log in your Microsoft Teams client.
    2. Click the Apps icon at the bottom left of your Microsoft Teams window to open the Apps panel.


      Figure: Apps Panel

    3. Use the search bar to search for Developer Portal.


      Figure: Developer Portal

    4. Select Developer Portal.
    5. Click Add.

      Image Modified
      Figure: Add Developer Portal

      You can see the home page of Developer Portal.

  2. Create a new app.
    1. Click Apps at the top of the home page of Developer Portal.

      Image Modified
      Figure: Apps Panel

    2. Click New app.

      Image Modified
      Figure: Create a new app

    3. A dialog box prompts to specify a short name for your app that is used for configuration in Digital Agent as the bot username. Mention the name for the bot username.
    4. Click Add.

      Image Modified
      Figure: App Name

    5. Specify the required values for your app, and click Save.

      Image Modified
      Figure: New App Panel

      • In the Descriptions fields, specify a short description for your app.

        Image Modified
        Figure: App Descriptions

      • Mention all the mandatory information accordingly.

        Image Modified
        Figure: Dev information and App URLs

  3. Configure your app.

    1. Switch to Apps panel and select the app that you created.

      Image Modified
      Figure: Select App

    2. Navigate to Configure > App features.
    3. Select Bot.

      Image Modified
      Figure: App features

    4. Locate your bot in Identifyyour bot section.

    5. In the bot settings, choose Personal, Team and GroupChat for Scope to enable your bot app for various types of chats.

    6. Save your settings and you can see your bot in the Bots panel.

      Note
      titleNote

      You need to create a bot if you don't have one. You can either create a bot with Microsoft Bot Framework or with Microsoft Azure. For specific steps, see Creating a bot with Microsoft Bot Framework or Creating a bot with Microsoft Azure.


  4. Publish your app.
    1. Navigate to Publish > App package.

      Image Modified
      Figure: App package

    2. Click Download app package.

      Image Modified
      Figure: Download App package

    3. Navigate to Apps. Click Manage your apps.

      Image Modified
      Figure: Manage Apps

    4. Click Upload an app.

      Image Modified
      Figure: Upload App

    5. Select Upload a custom app to add the app to a team. Upload the app package that you downloaded in sub-step b.

      Image Modified
      Figure: Upload custom App

    6. Select Add to a team from the drop down menu.

      Image Modified
      Figure: Add to a team

    7. Type or select a team to set up your bot.

      Image Modified
      Figure: Set up a bot

  5. Optional: You can also choose to publish your app to your organization's app catalog, so that it is shareable within your organization.

    1. Navigate to Apps > click Manager your apps.

      Image Modified
      Figure: Manage your Apps

    2. Select Submit an app to your org to publish your app.

      Image Modified
      Figure: Submit app

      Your app will appear on your Apps homepage after the IT admin of your organization approves.

      Image Modified
      Figure: App Catalog

      Now, people in your tenant can see this app and can use it.

Creating a bot for Microsoft Teams bot app

Microsoft offers two ways to create a bot. Microsoft Azure or Microsoft Bot Framework are the two options. Select any one of them as per the requirement.

  1. Creating a bot with Microsoft Bot Framework
    You can create a Microsoft Bot Framework bot for your bot app using the Microsoft Developer Portal tool.

  2. Creating a bot with Microsoft Azure
    You can use Microsoft Azure portal to create a resource using the Bot Channels Registration service, configure the resource, obtain the bot password, and setup channels in order to create a bot with Microsoft Azure. 

Anchor
Bot_with_MS
Bot_with_MS
Creating a bot with Microsoft Bot Framework

Use the Microsoft Developer Portal tool to create a bot with Microsoft Bot Framework. Then, set it up for your bot app.

...

  1. Create a new resource.
    1. Launch the Microsoft Azure portal at portal.azure.com.
    2. Navigate to Azure Services > click Create a resource.


      Figure: Create resource

    3. Search for Azure bot in the search bar and select it.


      Figure: Azure bot

    4. Click Create to create a new resource.


      Figure:  Create Resource - Bot Channels

    5. Specify the required values, where:

      1. Bot handler is a unique identifier for your bot. You can set it to be your bot name.
      2. Resource group is a container that holds related resources for an Azure solution. You can create a new one if you don't have one.
      3. Messaging endpoint needs to be configured later. You can leave it blank for now.
      4. Microsoft App ID and password are mandatory fields. Set it as Auto create App ID and password. Otherwise, you can create one manually.

    6. Click Create. It takes a while to complete the creating process. You can see a notice in the Notification at the upper right of the menu bar.


      Figure: Create bot with Azure

  2. Configure the resource.
    1. Click Go to resource when you see the notification. You can also check the resource from the portal home page. Click All resources to see the one you just created. Select it to start configuration.
    2. Navigate to Settings > Configuration.
    3. Specify the required values for your resource.

      1. Click the checkbox next to Enable Streaming Endpoint to enable it.
      2. Specify the messaging endpoint after installing Digital Agent.
      3. Click Apply.

    4. To get the bot password, click Manage next to Microsoft App ID. Open Certificates & secrets panel.

      1. Navigate to Client secrets > New client secret.
      2. Add a client secret displays.
      3. Specify the description for your resource.
      4. Set the Expires value for 24 months.
      5. Click Add.
        The resource details are displayed in the table with Description, Expires, Value, and ID. Your bot's Value is its password. When configuring Digital Agent, save it for later use, as it is displayed only once.

        Note
        titleNote

        The Microsoft App ID is the bot ID in the App Studio of Microsoft Teams. You will need it when you configure your Microsoft Teams in later steps.

  3. Configure the channels.
    1. Go back to the resource page. Navigate to Settings > Channels. Now, only Web Chat is listed in the table.
    2. Navigate to Add a featured channel > click Microsoft Teams icon.
    3. Click Save.

  4. Set up the bot for your bot app in Microsoft Teams.
    1. Open the App Studio tool in your Microsoft Teams client.
    2. Click your resource that is listed on the panel.
    3. Navigate to Capabilities > BotsEdit.


      Figure: Capabilities section

    4. Click Connect to a different bot id.
    5. Mention the Microsoft App ID that you have for your Azure bot.
    6. Select Team for Scope to add the bot app to your teams.
    7. Click Save.

...

If the IP address of Digital Agent server is public, you can use the Chatbot messaging-endpoint URL <https://devdigitalagentwb.symphonysummit.com/api/v1/messaging/webhooks/digital-agent/teams> directly. Otherwise, you must configure your own network firewall or use some proxy servers to make sure that your MS Teams can access the web hook of Digital Agent server from Internet.

Note
titleNote

You can find the values for protocol, hostName, port, and basePath messaging-endpoint URL <https://devdigitalagentwb.symphonysummit.com/api/v1/messaging/webhooks/digital-agent/teams>. Where,

  • <messaging-endpoint.protocol>: the default value is https;
  • <messaging-endpoint.hostName>: the host name is https://devdigitalagentwb.symphonysummit.com/;
  • <messaging-endpoint.port>: default value;
  • <messaging-endpoint.basePath>: the default valueishttp://api/v1/messaging/webhooks/.
  • <messaging-endpoint.botId>: the value is digital-agent; 
  • Channel name: Teams.

...

  1. Launch and log in your Microsoft Teams client.
  2. Click Developer Portal and click Tools.


    Figure: Developer Portal

  3. Click Bot management.
  4. Choose the bot that you created and start editing your bot app.


    Figure: Bot management


    Figure: Select bot

  5. Click Configure.

    Image Modified
    Figure: Configure messaging endpoint

  6. Specify the Bot endpoint address input box under Endpoint address with the Digital Agent web hook URL if it is publicly accessible. Otherwise, you must fill in with your public proxy URL that transmits network payload to Digital Agent web hook URL.

    Image Modified
    Figure: Bot endpoint address

Configuring messaging endpoint for the Microsoft Azure bot

...