The author’s African Grey parrot

Defining External Slot Types

An Alexa Skill Building Video Tutorial

Craig Walls
2 min readJul 19, 2022

--

https://pragprog.com/newsletter/

In the interaction model for an Alexa skill, utterances are the things a user might say to your skill and that are resolved into discrete intents to be handled by your skill’s fulfillment code. Slots are placeholder in an utterance that act as parameters.

For example, in a weather skill, a user may ask about the weather in Denver, Orlando, Los Angeles, or any city. Rather than have distinct intents for every city, a single intent can define a slot of type “AMAZON.City” and the city spoken by the user will be passed to the fulfillment code as a parameter used to look up the city’s weather information.

Although Amazon provides a impressive set of built-in slot types for many domains, you’ll often find the need to create custom slot types to cover domains not provided by Amazon.

In the following video, I show not just how to create custom slot types, but how to create them external to a skill. By separating the slot type from the skill’s interaction model, you are able to more easily manage and update the slot type without republishing a skill. What’s more, you will be able to use the externalized slot type in multiple skills without having to duplicate it in each skill’s interaction model.

If you enjoyed this post, you might also enjoy Build Talking Apps for Alexa by Craig Walls, now available in beta from The Pragmatic Bookshelf:

In honor of the Alexa Live 2022 event, you can use promo code ALEXALIVE2022 at checkout to save 35% on the ebook through July 22nd.

--

--