question

newuser-f4fa1497-ffc1-4536-9541-7e648a162286 avatar image

Help cycling handler Intent

Is it possible to call back a handlerIntent or a method of this HandlerIntent without the need for the user to interact with Alexa?

For example, my handler calls a web service that brings a list of people but it is updated live from a web,

I need that when you finish saying the list of people,

this handler is automatically called again countless times without the user I have to say for example

"Alexa query list of people", I want to continue consulting this service and only turn off when you say for example "Alexa stop the query" is this possible?

my code :




const CustomServiceIntent = {


canHandle(handlerInput) {


return handlerInput.requestEnvelope.request.type === 'IntentRequest'


&& handlerInput.requestEnvelope.request.intent.name === 'CustomServiceIntent';


},


async handle(handlerInput) {




try {


// mensaje de espera


await logic.callDirectiveService(handlerInput,"espera");


} catch (error) {


// fallo el mensaje de espera


console.log("Progressive directive error : " + error);


}




const response = await logic.consultaServicioDeLLOKO(1,1,1100);


let speechText="";


if(response) {


console.log("estamos en el front" + JSON.stringify(response));


const results = response;


results.forEach(function (elemento, indice, array) {


speechText += " El " + " " + " siguiente " +" "+ " niño " + " "+ " en "+" " + " salir es " + " " +" . " + elemento.nombre + " . " ;


});


}


return handlerInput.responseBuilder


.speak(speechText)


.reprompt('tss')


.getResponse();


}


};







please any help you can give me I will appreciate it

alexa skills kit
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers