Best slot type for collecting an account number in a Lex bot

0

I'm working on a Lex bot to accept a caller's spoken account number (9-12 digits) and 4 digit PIN. And while Slot type AMAZON.FOUR_DIGIT_NUMBER works great for the PIN, I'm running into difficulties with the account number. Slot type AMAZON.NUMBER sometimes works. But I've also been cut off in the middle of speaking the account number. For example, it will sometimes cut me off after speaking only 5 numbers - and it's not because I'm pausing or anything.
Is there any way to specify that it should listen for at least 9 digits, and no more then 12?

mhal20
preguntada hace 4 años1158 visualizaciones
1 Respuesta
1

Found the answer:
Add new slot type,
Extend slot type (extends AMAZON.AlphaNumeric using a regular expression),
Enter expression: [0-9]{9,12}
Which restricts input to numbers 0-9, min length 9, max length 12

mhal20
respondido hace 4 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas