Alexa-skills-kit-sdk-for-nodejs: Dialog Management doesn't work.

Created on 7 Jun 2017  路  14Comments  路  Source: alexa/alexa-skills-kit-sdk-for-nodejs

Hi,
when I put this.emit(':confirmIntent') into my code, my intent always returns null and when I speak to the Echo device, it says the response is invalid.

Is there maybe some other way I can directly return the Dialog Delegate Directive, something I have to include, some way you can fix the potential bug?

Thanks

Most helpful comment

You do not need to return the directive itself, but you should place a "return" on the next line to end the processing of the handler. The emit is just put on the event loop and not executed at the same moment.

All 14 comments

Have you included speechOutput and repromptSpeech parameters for the confirmation? (e.g. this.emit(':confirmIntent', "Can you confirm you wanted x?", "Please could you confirm if you wanted x?"). It doesn't use the dialog models from Alexa Skill Builder if you use :confirmIntent, you have to specify the confirmation dialog yourself. Use this.emit(':delegate') if you want to use the dialog models from Alexa Skill Builder.

@knowlsie I still get the message "There was a problem with the requested skills response". Unfortunately, I get the same error when I write this.emit(':delegate') for slots that I have created in the interface builder.

Ah, right. Unfortunately, I need to sleep right now, but if this is still an issue I'll look into it soon-ish. Is it possible to give more context/code, or maybe find a better error message?

Also, I do totally see how the README is a touch confusing on this one. Particularly:

You can use this.emit(':confirmIntent') or this.emit(':confirmIntentWithCard') to send confirm intent directive response.

That makes it look a little like you don't need to include parameters, and that style isn't really done anywhere else in the docs (except the equivalent for elicitSlot, and annoyingly some documentation that I wrote on this.response (馃憥 to me)).

Ah ok, I would prefer to not write code on here, but rather via email, so if you don't mind, it would be great if you could send me your email address and I will contact you tomorrow morning. Thanks and have a good night.

I am having the same problem. Were you ever able to resolve this. It seems that the "this" object does not have any of the dialog directives when I do a console.log of "this". I have tried building and rebuilding my dialog interface in beta to no avail. I have required slots even a dummy intent with a required slot and the dialog directives just won't work. Please help.

I realize why mine wasn't working. The Node.JS sdk that is packaged as a template doesn't seem to support any of the dialog interface, all other parts of the Alex SDK seem to work. Once I uploaded the current Alexa SDK for Node.js, everything started working, but the downside is that I can no longer used the inline editor to modify my code.

Yeah, sorry for the slow reply. That's a known issue, it's here: https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/issues/114

Would be great if someone with the power to do so could correct this... (the issue described in #114 -
wrong version of Alexa SDK bundled in).

Having the same issue...

:elicitSlot and :confirmSlot generate an error on Echo (as in the code example). I'm using Alexa-SDK v.1.0.10 in my own .zip/deployment pkg.

Here's my code example:
https://gist.github.com/stormbytes/1faa3c50a3d1a29ff15502da4ba0b318

Found the culprit. Apparently this.emit(:elicitSlot... or :elicitConfirmation need to be returned explicitly (eg. return this.emit('elicitSlot', foo, bar, etc).

Updated code example.
https://gist.github.com/stormbytes/7ee3a05aa03c0ada0621dde746f2a6f9

Does anyone know why dialog directives would need to be returned explicitly when others do not?

You do not need to return the directive itself, but you should place a "return" on the next line to end the processing of the handler. The emit is just put on the event loop and not executed at the same moment.

Issue resolved. Please feel free to reopen this issue if further questions. Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

developer170883 picture developer170883  路  4Comments

lucidokr picture lucidokr  路  5Comments

rmtuckerphx picture rmtuckerphx  路  3Comments

captnCC picture captnCC  路  6Comments

giorgio79 picture giorgio79  路  4Comments