Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

375
Views
guardar/recordar la respuesta de confirmación de intención de un usuario de Alexa?

Tengo un mensaje de confirmación para una de las intenciones de mi habilidad de Alexa, y ahora lo necesito para "recordar" la respuesta del usuario y no volver a preguntarle. Esencialmente, queremos que se le pregunte al usuario solo la primera vez que use la habilidad, y nunca más. ¿Es eso posible?

Espero no tener que volver a escribir el código total y poder actualizar mi código existente. Aquí está el código javascript de mi intención (simplificado) para la función lambda para la habilidad:

 'myIntent': function() { // there is a required prompt setup in the language interaction model (in the Alexa Skill Kit platform) // To use it we "deligate" it to Alexa via the delegate dialoge directive. if (this.event.request.dialogState === 'STARTED') { // Pre-fill slots: update the intent object with slot values for which // you have defaults, then emit :delegate with this updated intent. this.emit(':delegate'); } else if (this.event.request.dialogState !== 'COMPLETED'){ this.emit(':delegate'); } else { // completed var intentObj = this.event.request.intent; if (intentObj.confirmationStatus !== 'CONFIRMED') { // not confirmed if (intentObj.confirmationStatus !== 'DENIED') { // Intent is completed, not confirmed but not denied this.emit(':tell', "You have neither confirmed or denied. Please try again."); } else { // Intent is completed, denied and not confirmed this.emit(':ask', 'I am sorry but you cannot continue.'); } } else { // intent is completed and confirmed. Success! var words = "You have confirmed, thank you!"; this.response.speak(words); this.emit(':responseReady'); } } },

¡Gracias por cualquier ayuda!

Actualización: implementé con éxito esta nueva función utilizando la ayuda de la respuesta aceptada. Sin embargo, tuve que reescribir todo por completo para que se ajustara a la nueva versión del SDK de Alexa.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede persistir/guardar/recordar los datos del usuario de alexa usando atributos persistentes .

Le recomiendo que siga el tutorial de muestra de habilidades de alexa de cero a héroe , resuma todo lo que necesita saber sobre el desarrollo de una habilidad en Alexa con ejemplos y videos.

Y lo que necesita de este tutorial es la Parte 4 - Persistencia

Y entonces, será tan fácil como:

 attributesManager.setPersistentAttributes(sessionAttributes); await attributesManager.savePersistentAttributes();
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!