Is there any way to develop own Webchat instead of Microsoft Botframework-Webchat - botframework

I don't want to keep any dependency on Microsoft Botframework registration for Webchat. I have successfully deployed my Bot Code in Shared Server instead of AzurePortal, But to use the Webchat I have to register the Bot in AzurePortal.
My concern is to develop own Webchat which will directly communicate with the Bot API Endpoint.
Have anyone work on this situations.

To clarify, bots communicate via:
User interaction with DirectLine Client ->
DirectLine API receives data and sends to bot ->
Bot hosted anywhere receives message
WebChat is just a DirectLine client. If you want to build your own WebChat, you can clone the repo and build it yourself. Note, however, that all this does is make it so you can host your own webchat.js file.
I believe that what you're actually looking for is to build your own DirectLine API. The only way to do so, currently, is to develop it in Node with the offline-directline npm package. This is not an official Bot Framework package, but will accomplish what you need. To then use WebChat with offline-directline, you would just need to change domain property when rendering WebChat.

Related

Teams communication to custom https endoint

I would like to know how does Team communicate with a custom https endpoint.
I am developping a bot using Teams Toolkit and I am trying to understand what commands does teamsfx in order to successfuly side load app on Teams.
When trying to run the default command of "dev:teamsfx" and building the package using the correct ngrok enpoint and then uploading that package on Teams, the bot does not receive any messages through the "api/messages" endpoint.
However, when i run the deugging tool in VS Code, everything works fine and we pin pointed that the part that we are missing to add is found inside of these commands :
Teams Toolkit executed commands
So i have 2 questions :
Where can i find documentation regarding the tasks that Teams Toolkit is running so that we can manually execute those commands?
Why does Teams not reach our "api/messages" endpoint when we ONLY run "dev:teamsfx" ? (The appPackage is correct with the right manifest)
To answer your two questions:
The documentation about using Teams Toolkit to debug you app is here. You can read the documentation to know the details about what Teams Toolkit does for you after you press F5. For bot, Teams Toolkit will register and configure the bot, see here for more details.
When you run dev:teamsfx, the bot service will start. However, you have not configured the bot messaging endpoint, this is why Teams does not reach api/messages. When you press F5, Teams Toolkit will automatically start ngrok to forward the local bot traffic to a public url, then use this url to configure the bot messaging endpoint, e.g. https://0556-2404-f801-9000-1a-6fea-00-690.ngrok.io/api/messages. If you want to use your own tunnelling tool instead of the default ngrok, you can follow this doc. By the way, you can manage the bot (that Teams Toolkit has created for you) in Bot Framework developer portal, https://dev.botframework.com/bots.

js client for azure DirectLine App Service Extension

I am using DirectLine App service extension in order to connect with bot logic. I want to know if there any JS client available for this on the UI side. Azure documentation have C# one
https://learn.microsoft.com/en-us/azure/bot-service/bot-service-channel-directline-extension-net-client?view=azure-bot-service-4.0
but I am looking for a Js client because I want to develop a custom UI. I don't want to use webchat for this.

How to embedded Microsoft Bot Emulator on my website

I'm trying to have the bot emulator running on my website, so the user can add cards & contact and test it from the website.
The Emulator is built on the WebChat application/source code. WebChat is a directline client for the directline channel. The emulator is used for development and testing. You can use webchat as a way to test, but you're not going to get some of the tools/benefits you get from Emulator. You might be able to take the emulator source code and build what you need, but that seems like a lot of work for so little benefit.
Your bot code does not have to be hosted in Azure, but for the simplest setup, you should create a bot channels registration in Azure and use that. Configure that to set your endpoint to wherever your bot code is running and then use the webchat channel and client.

Can we develop a functional or process bot using azure service

I'm looking for a solution where my bot can understand users request(may be with LUIS this can be achieved) and verifies/validates the user/requirement with master data. If all good, then connect to my native database(Siebel CRM via API) to perform the defined action and log a reference ticket(via API) and finally send an email to user using outlook. Is this achievable using azure service?
Yes, the Bot Framework can do all of those things:
my bot can understand users request
LUIS is perfect for this.
verifies/validates the user/requirement with master data
All of this can be done within Waterfall dialogs or Prompts. You can either store the master data in the bot code, or query it from an external source and have the bot validate against it.
Here's a good sample for prompts and validation.
connect to my native database(Siebel CRM via API) to perform the defined action and log a reference ticket(via API)
The bot runs on C#/Node, so anything (including calling your APIs) that you can do in C#/Node, you can do in your bot.
send an email to user using outlook
Bot Framework has a specific Email Channel for this or you can use the Graph API.
Recommended Resources
Docs and QuickStarts
Samples Repo
Reference Docs: C# / TypeScript
LUIS Docs

Microsoft Bot Framework Client sdk

I am looking to use Microsoft Bot Framework in my application. However, I have a custom UI chat control (designed according to my requirements) where I need to hook up this bot.(instead of having pre-configured channels like slack or skype).
Is there a client sdk for web (preferably in angular) and/or mobile available for this purpose?
Take a look at DirectLine.
The Direct Line API is a simple REST API for connecting directly to a single bot. This API is intended for developers writing their own client applications, web chat controls, or mobile apps that will talk to their bot.
DirectLine is always a good option to add chat functionality in your custom UI. Otherwise you can just turn on Web Chat channel and embed iframe in your webpage. This will make your job easy with very less errors.
I have seen directline causing many issues while sending requests. Web Chat is always a better option.

Resources