0

I’m working with Microsoft bot framework (Node js) on a project with a multi chatbot approach.

After Registering the bot with the Microsoft Bot Framework, adding multiple Skype for Business channels and registering the bot to a Skype for Business different tenants(replaced by the Name parameter with the bot display name and with unique users accounts from their domain), I’m trying to identify the bot from the "bot" object inside the session message coming from SFB that will help me to detect the user domain and ensure that user is receiving the correct answers depending on his domain When testing this approach with the emulator I’m always receiving the same bot object.

So, I’m trying to modify the BotFramework WebChat Emulator source code to emulate SFB and set the SFB dev environment with a new textbox by putting the generated sip of the chatbot in the session to test my solution.

I’m asking if there is a way to simulate SFB inside the Microsoft BotFramework WebChat Emulator?

Thank you in advance!

1 Answers1

0

The Bot Framework Emulator cannot simulate Skype for Business because:

  • The emulator has a built in Connector Service that is modeled more after the Direct Line channel's connector service. The behavior of this service will not exactly match the behavior of the Skype for Business connector service.

  • The emulator uses Web Chat as the UI client. Skype for Business has various clients, and none of them will render activities the same way Web Chat does. Skype for Business clients do not support the same message types (Cards, buttons, etc).

If you are using the v4 emulator, you can modify your .bot file and provide whatever bot id you like:

{
    "name": "TestBot",
    "description": "",
    "services": [
        {
            "type": "endpoint",
            "appId": "",
            "appPassword": "",
            "endpoint": "http://localhost:3979/api/messages",
            "id": "sip:testfakebotid",
            "name": "http://localhost:3979/api/messages"
        }
    ],
    "padlock": "",
    "version": "2.0",
    "overrides": null,
    "path": "C:\\BotFiles\\TestBot.bot"
}

This id will then be sent to the bot in every message, as the activity.Recipient.id:

enter image description here

Eric Dahlvang
  • 8,252
  • 4
  • 29
  • 50