Skip to content

Latest commit

 

History

History
 
 

slot-value-check

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Ingredients

slot-value-check


What you will learn

Users may not say everything you expect. They may just say "my name is". We can use a function that returns either null, or the value of the slot.

For example, if you had set slotName = "FirstName", you could check it via:

var slotValue = isSlotValid(this.event.request, slotName); //slot value or false
        if  (slotValue) {  } else {   }

Instructions for deploying this sample skill

  1. Create a new AWS Lambda function using the fact blueprint.
  2. Delete the code, replace with index.js
  3. Locate and Copy the AWS Lambda ARN for the new function.
  4. Create a skill with a slot called Item
  5. On the Configuration page, paste in your Lambda ARN as the endpoint.
  6. Test your skill, both with and without saying slot words.
  • Copy the isSlotValid() helper function to use in your code.