Amazon Alexa Slot Types
Amazon has several slot types that are built-in inth the Alexa Skills Kit.
BotTalk provides the multi-platform alternatives for some the common slot types using the prefix @bottalk
.
However, when you want to develop a scenario in BotTalk that targets Amazon Alexa platform specifically, you might want to use some of the less common slot types natively.
For example:
AMAZON.Actor
AMAZON.EUROPE_CITY
AMAZON.VideoGame
and so on. You can find the whole list of Alexa slot types here.
Using Amazon Alexa Slot Types in BotTalk
Here is how you would use these Alexa-spefic slot types in BotTalk:
Your Scenario steps could look something like that:
- name: Initial step
actions:
- sendText: 'Hey, what is your favorite actor?'
- getInput:
next:
actor_choice: Video Game Question
AMAZON.CancelIntent: Exit
AMAZON.StopIntent: Exit
AMAZON.HelpIntent: Help
- name: Video Game Question
actions:
- sendText: 'And what video game did you enjoy the most?'
- getInput:
next:
videogame_choice: City Question
- name: City Question
actions:
- sendText: "Finally, what is the most romanic european city you've been to?"
- getInput:
next:
europeancity_choice: Read Choices
- name: Read Choices
actions:
- sendText: >
That's a match! {{ actor }} is enjoying a glass of nice wine,
looking at the sunset in {{ city }},
after just finishing {{ game }}!
In your Intents section:
---
intents:
actor_choice:
- '{actor}'
videogame_choice:
- '{game}'
europeancity_choice:
- '{city}'
In your Slots section:
---
slots:
actor: 'AMAZON.Actor'
game: 'AMAZON.VideoGame'
city: 'AMAZON.EUROPE_CITY'
Finally, save and deploy to Alexa Console
The result in the Alexa Simulator: