botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

How to Clear Chat Bot Conversation from UI (Emulator/WebChat)?

Open virendrak opened this issue 9 years ago • 6 comments

I am developing a ChatBot application, where I am using Microsoft Bot Framework (.NET/C#).

image

I have used Configuring Channel - Web Chat, added this chat IFrame code in my SharePoint/Web Page. I would like clear bot conversations on typing text like (reset/clear).

How to clear/reset conversations on Bot Emulator or WebChat? Is there any in-built function/method available in MS Bot-Framework (C#), to achieve this requirement?

virendrak avatar Dec 27 '16 08:12 virendrak

@virendrak We have built a similar interface, but instead of embedding the webchat as an IFrame, we have taken the code of the web chat and inserted into SharePoint as a webpart using script manager. This way you have more control over the web chat code and you can implement your custom operations to clear the window. We are using it to identify and set logged in user as the FROM identity in the conversation and using it with our Intranet Bot solution (http://www.acuvate.com/solutions/bot/)

Regards ~abhishan

abhishan avatar Dec 27 '16 12:12 abhishan

@abhishan , Thanks for the information!

I have followed the approach mentioned in https://github.com/Microsoft/BotFramework-WebChat/issues/228. I believe you have used (Node.JS) to develop your BOT. I am wondering if this can be achieved using C# by passing the message (user input) 'clear' or 'reset' as I am developing BOT using C#.

If you also developed BOT using C#, kindly provide more details on this line, - we have taken the code of the web chat and inserted into SharePoint

Really appreciate your help on this!!!

virendrak avatar Dec 27 '16 15:12 virendrak

Hi @virendrak, you can access that level of functionality by hosting the control yourself or by cloning/modifying the repo to add that feature.

Details are probably best discussed over at the Web Chat repo: https://github.com/Microsoft/BotFramework-WebChat

dandriscoll avatar Dec 27 '16 19:12 dandriscoll

Hi @virendrak, closing this issue now. If you'd prefer it remain open, please @mention me here. Cheers.

eanders-ms avatar Jan 28 '17 05:01 eanders-ms

Hi, I want to refresh my chatbot from the web page same as we do it from the Azure Test in Web Chat "Start Over"?

QaisarAwan avatar Mar 26 '19 12:03 QaisarAwan

@QaisarAwan 'Test in Web Chat' recreates the iframe when the 'Start Over' button is clicked.

Currently, Web Chat does not support restarting without a page refresh. Please follow along here for this feature's progress: https://github.com/Microsoft/BotFramework-WebChat/issues/1846

EricDahlvang avatar Mar 28 '19 18:03 EricDahlvang