Build An Alexa Decision Tree Skill
January 30, 2019 ยท View on GitHub
Customize the Skill to be Yours
At this point, you should have a working copy of our Decision Tree skill. In order to make it your own, you will need to customize it with questions and conclusions that you create. Open the index.js file, copy and paste it directly into Lambda, or into a text editor/IDE to make the customizations. Here are the things you will need to change:
-
New data. You will need to create a new set of messages, questions, answers, and descriptions for your skill.
-
Open your code file in the online editor: index.js.
-
The basic gist of how to customize the skill is to update the slots, slot types and prompts in the interaction model to match the questions you want to elicit the answers to, and then to update the
slotsToOptionsMapandoptionsdata elements in index.js. The slotsToOptionsMap is generated by concatenating the resolved value from the slots (e.g. very) and mapping that to the position index inoptions. You'll also need to update the list of the required slots in the index.js file.
-
-
When you have replaced the placeholders in index.js, copy the contents of your file to your Lambda function. This should be as simple as copying the text, and pasting it into the code box for your Lambda.
-
Once you have made the updates listed on this page, you can click "Next" to move on to Publishing and Certification of your skill.
