Search code examples
alexa-skills-kitalexa-slot

Best way to create a catch all slot in Alexa


What is today the best way to create a catch-all slot with Alexa, usable with another custom slot (so unfortunately not an AMAZON.SearchQuery slot, that is not usable with other custom slots, don't know why by the way)?

I've tried with AMAZON.Person as someone suggested but when I say something, Alexa tries to enforce what I say into a Person's name, and so Alexa will not understand exactly what I say.

The same behavior appears if I create a custom slot with some random words, Alexa will always try to match my input in one of those words "deleting" the original input.

The AMAZON. Person and custom slot with random words do the work if I use the developer console to test. In that case, any word I say will fall into the catch-all slot. The problem appears when I test the skill with the Echo Device, Alexa will always try to understand what I say in order to "force" the input into one of the slot examples, making the input unusable.

The language is en-US.

Is there a way to fix this problem and build a real custom slot?

Thank you


Solution

  • This is a common question and it's generally considered bad design because it can interfere with other intents (because it's so ambiguous) and make the skill more error-prone.

    That being said, I've had moderate success achieving this using the AMAZON.Book slot as a "Catch all" slot type.

    Be aware that if you do this you should check to see which other utterances will conflict with this in the conflicting utterances pane. Likely, you will also have to create custom intents for built-in intents such as AMAZON.YesIntent and AMAZON.NoIntent if you intend to use them in your skill. Otherwise, they may not be recognized.