Search code examples
c#.net-corebotframeworkazure-bot-serviceweb-chat

Bot Framework - Way to find the question for which bot has answered and user has reacted with buttons?


In Sample 9 (available here) of webchat example, we are providing the user an ability to react to the answer, is there a proper any find the question user has asked for which bot has answered and the user has reacted.

Currently, the way I am doing is, I have sending point activityId and replytoId to my bot when user reacts and then from my transcript table I am getting the text from the activity with id activityid and replytoid and getting the question and answer, is my approach correct, or do we have any simplified solution

Also is there a way to hide the reaction button after user response?

Thanks


Solution

  • Regarding the sample you mentioned (available here) you can see in the source code that this is purely a channel implementation: there is no link to your bot code on your bot server side.

    Your bot could be doing other things than QnA, so you have to do this "link" to a previous question posted on your own. And yes the basic link between the click on a feedback item and your history is the Activity Id, so your approach is one of the easier ways to do it.