Botframework reminder chatbot - c#

Does anyone know how they made bot like this and this? I am using BotFramework V4 and C# and i need to make a reminder feature like this.Does this use proactive bot? and if yes can someone explain in layman how proactive bot works? Thanks!
Update:

That likely uses proactive messaging, yes. I'm not sure if either of those use Bot Framework, but to do that in Bot Framework, you'll need proactive messaging.
Samples:
C#
Node
A proactive message is generally either:
A message sent to a user that hasn't spoken with the bot before (this is how Teams defines it), or
A message sent to a user that the bot has spoken with previously, but the message being sent is not really a part of the previous conversation (this is more how Bot Framework defines it)
Please see the docs linked above for more detail.
The gist of it, however, is that when a user talks with the bot, you save a reference to that conversation. At any future date that you want to talk to that user, you use that reference of the conversation (because it contains all of the pertinent user data) to message the user.
The tricky part with something like a reminder, however, is having the bot perform it at a particular time. Something like Task.Delay doesn't work very well at scale over long periods of time. The best thing to do for long, time-based delays would be set up some kind of other server to keep track of the time. Once that time expires, send a request to the bot to send the proactive message. The Proactive Sample does something kind of like the last part of that by accepting requests at api/notify.

Related

BOT does not calls choiceSelection method defined in PromptDialog.Choice using web-chat v4 framework

I am having a BOT application which is being developed using Microsoft BOT Framework V3 and WebChat Framework V4. In one of the scenario where user sends a particular utterance say "I want to place an order" which goes to LUIS and then BOT replies users to choose some choice using PromptDialog.Choice(context,choiceSelection,message). E.g. "Home Delivery", "Self Pickup"
Now when user clicks on one of the button (Say "Home Delivery"), then technically the choiceSelection method should be invoked but instead of that BOT takes that choice as a new utterances and calls the LUIS to which no intent is mapped and hence the scenario does not complete
with expected result.
Also I have checked with using BOT WebChat V3 version, the scenario works absolutely fine without failing. But due to client requirement, I would like to go with WebChat v4 instead of WebChat v3 framework.
Any suggestions, work around will be highly appreciated.
You have two options to choose from:
Limit how and when utterances and selections are captured by LUIS so every response isn't getting processed. Or,
Provide a "none" intent. If you supply your training model with sufficient examples for getting correct responses, then unrelated queries should map to "none". Really, the emphasis is on "sufficient examples". If you don't supply enough data to train your model with, then you will certainly get undesirable results. Once you get the "none" intent to properly produce, you can set the logic in your bot to recognize "none" was returned and to keep on going.
In truth, both options together would serve you well.
As for Web Chat, it has no bearing on LUIS responses. It is merely a client that receives and returns activities. Out-of-the-box, it does nothing to the activities unless you implement custom components and code.
For clarity, there is no relationship between Botbuilder v3/v4 and BotFramework Web Chat v3/v4. They can be used interchangeably. However, Web Chat v3 (a.k.a. "botchat") is deprecated and should not be used. Web Chat v4 is the platform you will want to use.
Hope of help!

How frequent can a ProActive bot send message to a user?

I am using BotFramework v4 with C#. I haven't yet tried making a proactive bot. But i am planning to do a Reminder-like feature. The user can make the bot remind him/her of something. So my question is can the bot remind a user everyday, everyweek or everymonth? Can you specify specific day or hours?
The Bot Framework SDK does not limit how many proactive messages can be sent; however, some channels do throttle messages from bots in general. As long as you not spamming a user, it should be fine.
Hope this helps!

Microsoft Bot Framework and Slack Direct Messaging - Bots Cannot Message Users in External Teams?

Following this post, Microsoft Botframework: Direct Conversation with Bot Channel, I implemented this code into my own bot, getting the error "Bots Cannot Message Users in External Teams". What does this mean and is there a workaround?
Ok, so here's what I did. I went back through Slack and resaved all the settings, and then it worked!. Also, make sure the workspace IDs match for your bot and who you're sending the message to.

Bot Framework on Messenger: Requesting thread control from Page Inbox not working

I have developed a bot and set it as the Primary Receiver on my Page, and set the Inbox as the Secondary Receiver. Everything is working okay except that when I manually send a conversation from "Done" to the Inbox, after a user sends a new message it automatically resends the conversation to the Done folder and for the bot to answer.
This does not happen if I use the "pass_thread_control" graph API request, on these cases the handover works as expected.
I found this documentation: https://developers.facebook.com/docs/messenger-platform/handover-protocol/request-thread-control#page_inbox
And it says that the Primary Receiver has to honor the request thread control event. My question is, how do I ensure this?
I am using the Azure Bot Framework, with .NET.
Facebook Handover is not currently supported by the Bot Framework, and is not on the roadmap, however, it is something they might be able to look into in the future if there’s enough demand.

#mention triggering wrong LUIS intent

I am currently developing a Microsoft Teams bot using the Microsoft Bot Framework. It works perfectly fine in web chat, the bot emulator, and 1-on-1 for how we need it to work in Teams. However, once we side-loaded it into our specific team in Teams, we are getting undesired behavior. Some of our intents are being wrongly triggered or no longer working at all now that we have to #mention the bot to talk with it. For example, when the user says "#mention hello", the StopVM intent is being triggered rather than our Greeting intent. When trying to just try out phrases using "#mention hello" or "mention hello" (where mention is our bot name), in the web chat or the bot emulator it properly triggers the Greeting intent. Yet, in the 1-on-1 chat in teams when we #mentioned the bot again this gave the StopVM intent again.
Is there any way to account for the #mention in our LUIS model? Or perhaps is there a way we could use REGEX to strip out the #mention before it is sent to our LUIS?
But then there is the other problem that responding to the bot to go through our form flows also sends #mention or mention to the form fields when we are not currently expecting this.
I guess the overall question is how do we account for the #mention in the user responses?
LUIS regex entities are not used to strip things; they are used to recognize entities.
Create a regex to recognize #mentions by creating a new entity of a regular expression type called AtMention or perhaps BotOrPerson as described in the article mentioned above, and then just include #mentions in your utterances. Your model will then recognize them for what they are.
The AtMention/BotOrPerson entities can either have no significance in your model or you can do something different if they are present - for example if the utterance #mentions someone other than the bot, it can trigger special behavior.
(#wajeed-msft - your suggestion won't work because LUIS sees the user's input before the bot does.)

Categories