Open miguelisidoro opened 5 days ago
if you post this as a question in Stack Overflow, I will be more than happy to answer it.
Hello @HesselWellema,
Please respond at https://stackoverflow.com/questions/78678224/use-botframework-webchat-in-a-react-app-with-customization.
Thanks
@miguelisidoro - Please find the responses to your questions, below.
Can we have an interface like in intercom.com?. An icon appears in the bottom corner of the web site and if you click, you open the chatbot interface.
A sample demonstrating this already exists in the samples folder of this repo, titled 06.recomposing-ui/a.minimizable-web-chat. Please review this to see if it meets your needs.
Is it possible to fully customize the web chat UI?
Web Chat is not fully customizable, though it is highly customizable. If you look over the various samples you will find that you can affect Web Chat in a variety of ways including building custom components and recomposing the UI, implementing different built-in style options, and altering functionality. However, Web Chat is built using React which handles updates to the DOM. This means making UI changes outside of Web Chat is not recommended as a best practice.
Is it possible to change the code of the chatbot in our application?
Web Chat is only a client application allowing the user to communicate with the bot. Changes made to the code of your bot are separate from Web Chat. Changes made in one should have no bearing on the other outside of conversational flow.
Is it possible to change the code of the web chat in order to call our APIs that will receive a prompt and generate a response?
Web Chat runs in the browser and consists of HTML and JavaScript. Any expected functionality that exists in a normal web app can be implemented in Web Chat. For instance, suppose a bot presents the user with several options of which one option, when selected, sends data to an API. The user, selecting that option, could trigger an event in the page that then posts the data to the API via an event listener. (There is a basic sample demonstrating this concept, too!)
Is it possible to change the Html and CSS?
As mentioned above, yes, but with limitations. The samples in 02.branding-styling-and-customization demonstrate how this can be achieved in most instances.
Thank you @stevkan, I had those doubts too. My project is very similar to miguelisidoro. I ended up creating the bot inside an HTML wrapper where I define a custom header:
Render ReactWebChat with useMemo to avoid mutiple calls to api:
Componente template:
Hello @HesselWellema,
Please respond at https://stackoverflow.com/questions/78678224/use-botframework-webchat-in-a-react-app-with-customization.
Thanks Stevkans answer is correct
@miguelisidoro - Please find the responses to your questions, below.
Can we have an interface like in intercom.com?. An icon appears in the bottom corner of the web site and if you click, you open the chatbot interface.
A sample demonstrating this already exists in the samples folder of this repo, titled 06.recomposing-ui/a.minimizable-web-chat. Please review this to see if it meets your needs.
Is it possible to fully customize the web chat UI?
Web Chat is not fully customizable, though it is highly customizable. If you look over the various samples you will find that you can affect Web Chat in a variety of ways including building custom components and recomposing the UI, implementing different built-in style options, and altering functionality. However, Web Chat is built using React which handles updates to the DOM. This means making UI changes outside of Web Chat is not recommended as a best practice.
Is it possible to change the code of the chatbot in our application?
Web Chat is only a client application allowing the user to communicate with the bot. Changes made to the code of your bot are separate from Web Chat. Changes made in one should have no bearing on the other outside of conversational flow.
Is it possible to change the code of the web chat in order to call our APIs that will receive a prompt and generate a response?
Web Chat runs in the browser and consists of HTML and JavaScript. Any expected functionality that exists in a normal web app can be implemented in Web Chat. For instance, suppose a bot presents the user with several options of which one option, when selected, sends data to an API. The user, selecting that option, could trigger an event in the page that then posts the data to the API via an event listener. (There is a basic sample demonstrating this concept, too!)
Is it possible to change the Html and CSS?
As mentioned above, yes, but with limitations. The samples in 02.branding-styling-and-customization demonstrate how this can be achieved in most instances.
Hello @stevkan ,
Thanks for detailed response. I have a couple of more questions:
Thanks
I have a question
Hello,
I want to build a Chat bot in a custom React application (public web site). I have a few questions:
If this is possible, can you provide links to documentation on how to to this?
Thanks