question

GISS avatar image
GISS asked

How would you design letter and number code slots ended on letter D?

Hi, i would like my skill to catch a sequence of 8 numbers and one letter but i have a problem with the letter "D", for example, when i pass the sequence "01234567D", Alexa interpret the sequence like a phone number and not like i want. It works with the rest of letters, but not with the letter "D". How can design my intent to recognize the letter "D" withouth problems?

Many thanks.

alexa skills kitintentsslotsalexa skills
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andy Whitworth avatar image
Andy Whitworth answered

I've had to do something similar.

I created two custom slot types, "digitType" which I defined values 0 through 9 as valid values

and "alphaType" which I had as A through Z but you could just define a single value, D

Then in my intent sample utterances I put the following:

1626877153162.png

where "one", "two".... "eight" are defined as digitType characters and "alpha" is defined as an alphaType character.

Then it's a matter of processing the populated slot entries in the intent handler.


1626877153162.png (23.0 KiB)
1 comment
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

It works, many thanks for your help.

1 Like 1 ·
Rokas avatar image
Rokas answered

I would look into multi value slot feature. Documentation can be found: here.

So for numbers I would use it and for letters I would use just single slot, so utterance would look like:

{numbers} (multi value slot enabled} {alpha}
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.