Create an Alexa skill
Create an Alexa-hosted skill using the Alexa developer console. Creating an Alexa skill helps you prepare to use the Alexa app.
Avant de commencer
Role required: admin
Procédure
- Log in to the Alexa developer console with your Amazon developer account.
- Click Create Skill.
- In the Skill name field, enter a skill name.
- From the Default language list, select a default language to add your skill.
- Under Choose a model to add your skill, select Custom.
- Under Choose a method to host your skill's backend resources, select Alexa-Hosted (Node.js).
- Click Create skill.
- To add your skill, select the Start from Scratch template.
-
Click Continue with Template.
Remarque :Creating an Alexa-hosted skill takes a few minutes.
- In the skill, navigate to Interaction Model > Intents > JSON Editor.
-
Replace the JSON Editor with the following JSON
script.
{ "interactionModel": { "languageModel": { "invocationName": "now agent", "intents": [ { "name": "AMAZON.CancelIntent", "samples": [] }, { "name": "AMAZON.HelpIntent", "samples": [] }, { "name": "AMAZON.StopIntent", "samples": [] }, { "name": "AMAZON.NavigateHomeIntent", "samples": [] }, { "name": "EverythingIntent", "slots": [ { "name": "EverythingSlot", "type": "Bag_of_words" } ], "samples": [ "{EverythingSlot}" ] } ], "types": [ { "name": "Bag_of_words", "values": [ { "name": { "value": "value: Hello world" } }, { "name": { "value": "name: bag_of_words" } } ] } ] } } } - Click Save Model.
- Navigate to Invocations > Skill Invocation Name.
-
In the Skill Invocation Name field, provide the skill
Invocation name.
Remarque :The skill name is the name which you use in your Alexa device to invoke the skill.
For example: <ask <skill name>.
-
Navigate to Interfaces and enable Alexa
Presentation Language.
Remarque :This option enables all the screen devices which you want to use in Alexa.
- Click Save Interfaces.