Can't use prompts in proactive dialog
My use case is this:
- User A initiates conversation with the bot
- According to the conversation result, the bot triggers a dialog with user B via
bot.beginDialog(proactive). - The bot presents user B with a confirmation prompt.
- User B answers the prompt ("yes").
- Bot returns "I didn't understand" error.
What's happening is that the answer to the prompt is received in a different dialog than the one triggered in step 2 (the root dialog from the previous conversation). Which is confusing, since the documentation for bot.beginDialogsays:
Proactively starts a new dialog with the user. Any current conversation between the bot and user will be replaced with a new dialog stack.
But it seems that the dialog stack isn't really replaced, as the incoming message isn't directed to the input dialog.
I'm using UniversalBot with ChatConnector, Node.js SDK version 3.1.1. I've reproduced it on several channels (Slack, Skype, Facebook).
Am I missing something here?
I am experiencing a similar issue with all of my prompts, which are started depending on a LUIS dialog response. One of the features for a bot I am working on is the ability to retrieve the forecast for a ZIP code. If you request, say, "weather 53204", the number entity is recognized and the forecast pulls as usual. Otherwise, it prompts you to enter your ZIP code, then retrieves the forecast.
In the past, both cases worked just fine. With the recent upgrade to BotFramework 3, however, only the case where an entity is recognized works. If I enter in a ZIP code at the prompt, the ZIP code is forwarded back to LUIS, which gives a completely irrelevant response. Here is the log:
ChatConnector: message received. weather session.beginDialog(/) / - session.sendBatch() sending 0 messages / - IntentDialog.matches(Weather) / - waterfall() step 0 of 2 / - session.beginDialog(BotBuilder:Prompts) .Prompts.number - session.send() .Prompts.number - session.sendBatch() sending 1 messages Just call me the WeatherBot. What’s your ZIP code? ChatConnector: message received. 53221 session.beginDialog(/) / - session.sendBatch() sending 0 messages / - IntentDialog.onDefault() / - waterfall() step 0 of 1 / - session.send() / - session.sendBatch() sending 1 messages Logging this question into the training files. I can answer this once I’ve been trained a bit more!
I as not able to get the prompts working on a proactive bot even in the previous version.
@randa1 Coming across the same issue. Did you ever find a solution?
Unfortunately I didn't...
I handled it in code by defining a different intent for the response of the prompt.
I haven't tried this in version 3 of the framework, I hope it works there.
@officialdharam Thanks a lot. It does not work in v3 either unfortunately...
So when you try to contact user B from user A's conversation, where are you getting the address for user B from? You can only start a new conversation with user B using the address object saved from a previous conversation with user B. Is that what you're doing?
You can't reliably create a new address object from scratch
@Stevenic (following up on the conversation on Gitter). Even when there's only one user involved it does not seem to work. E.g.:
intents.matches(/__test/, function(session){
bot.beginDialog(session.message.address, '/test');
});
bot.dialog("/test", [
function(session, args, next){
builder.Prompts.choice(session, "Choose:", ["foo", "moo"]);
},
function(session, results){
session.send("You chose: " + results.response.entity);
session.endDialog();
}
]);
The second step of the /test waterfall is not called.
I just verified that proactive dialogs aren't working. There was a bug in the Node SDK but there's also a bug in at least the Facebook channel that I need Tom to look into. He's out of town until Wednesday so unfortunately may take us a couple of days to get this ironed out.
@Stevenic Understood. Thanks a lot. Just wondering: have you committed the Node SDK change already (I am only using Skype at the moment and would be keen to give it a go), or will you wait for the other changes?
I'll try it with skype. we're not sure if it's limited to Facebook so I'll give it a go on skype later today. I'm not convinced I have my side fully fixed yet.
I think I have it fixed... Just pushed v3.2.3 give that a try
@Stevenic Fantastic. It's working for me on both Skype and Slack. Thank you so much for doing this. I have to say I did try to find a fix... to no success :-).
I remember raising this as a concern two months back... Nice to see that it works now.
We've had a lot of bugs on our plate. Sorry it took so long to get to this one but glad it's working now :)
I'm still having this issue with V3.2.3 in Facebook. The second step of the waterfall is not called. Instead the root step ('/') is called.