A few of my Intents for my Alexa app require certain slots. The Alexa skills builder makes this easy. I can mark a slot as required and set what Alexa should ask in order for the user to provide the information for the slot. The thing is that as a developer, you have to tell Alexa with your lambda that you want Alexa to handle the slot filling.
Reading the documentation, I get to this part:
It states
If the dialog is IN_PROGRESS, return Dialog.Delegate with no updatedIntent.
How do I do this? In my lambda I have
@Override
public SpeechletResponse onIntent(final IntentRequest request, final Session session)
throws SpeechletException {
Intent intent = request.getIntent();
String intentName = (intent != null) ? intent.getName() : null;
if ("AddTwoNumbers".equals(intentName)) {
if (!request.getDialogState().equals("COMPLETED")) {
return new DelegateDirective();
} else {
handleAdditionIntent();
}
} else { // handle other intents}
}
Their code sample doesn't seem too helpful either.
} else if (intentRequest.dialogState != "COMPLETED"){
// return a Dialog.Delegate directive with no updatedIntent property.
} else {