I have only 1 intent, which must ask for a pin code. If the pin code is not right, then ask it again, maximum 3 times.
What's the right way to implement it? (I use alexa-sdk with nodejs)
I tried to implement two approaches, but they failed with EXCEEDED_MAX_REPROMPTS:
if pin_is_correct
emit(:tell, "cool")
else
emit(:ask, "what is your pin?", "what is your pin?")
and
unless pin_is_correct
let updatedIntent = this.event.request.intent
delete updatedIntent.slots.MY_PIN_SLOT_NAME.value
this.emit(':delegate', updatedIntent)
if this.event.request.dialogState !== 'COMPLETED'
this.emit(':delegate')
emit(:tell, "cool")
any example solving this same problem?