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

381
Views
save/remember an Alexa user's intent confirmation response?

I have a confirmation prompt for one of my Alexa skill's intents, and now I need it to "remember" the user's answer and not ask the user again. Essencially, we want the user to be prompted only on the very first time they use the skill, and then never again. Is that possible?

I'm hoping I don't have to do a total code re-write, and can just update my existing code. Here is my intent's javascript code (simplified) for the lambda function for the skill:

    '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');
        }
    }
},

Thanks for any help!

Update: I have successfully implement this new feature using the accepted answer's help. However I had to totally re-write everything to fit the new version of the Alexa sdk.

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

0

You can persist/save/remember alexa user's data using persistent attributes.

I recommend you to follow alexa skill sample tutorial zero to hero it summarise everything you need to know about developing a skill on Alexa with examples & videos.

And what you need from this tutorial is the Part 4 - Persistence

And then, it will be as easy as:

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!