alexa-skills-kitalexa-slot

How to create a custom slot type?


I am trying to create a slot type to recognize a flight number for example 'VB001', 'VB002', 'VB101', 'VB201' it can be a random number with the 'VB' at the beginning.

I try adding a listo of slot values but it didn't work so I do no know how to create this custom slot.


Solution

  • Here is a detailed tutorial on how you can create custom slots : https://developer.amazon.com/en-US/docs/alexa/custom-skills/create-and-edit-custom-slot-types.html

    However, you can skip the whole custom slot creation thing with a minor change in your sample utterances. As you said, your flight number is always going to have VB in the flight number. So you can create sample utterances like this: "my flight number is VB {flightNumber}" or "my flight number is V B {flightNumber}", and this flightNumber will have slot type of Amazon.FOUR_DIGIT_NUMBER.