Monday, 22 August 2016

alexa slot handles letter and number code


For example bras size are something like 34A or 36D

Alexa should have no problem of handling it, you have several way to do it:

1.    {1-100|BRASIZE} {a|b|c|d|d|e|f|g|gg|CUP}

2 .   Or create a customized slot and put all size together, such as:

28A
28B
28C
28D
28DD
28E
28F
28FF
28G
28GG
28H
28HH
28J
28JJ
28K
30A
30B
30C
30D
30DD
30DDD
30E
30F
30FF
30G

However, if you have a intent which has 2 slots, but customer something just give one of them. then the first method above doesn't work.


A better way to handle this is user session:

https://github.com/bignerdranch/developing-alexa-skills-solutions/tree/master/2_slotsSlotTypes/solution/airportinfo

doc:

https://github.com/bignerdranch/developing-alexa-skills-solutions/blob/master/coursebook/mlbVUISessions_Chapter.pdf



No comments:

Post a comment