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
posta 4 anni fa1158 visualizzazioni
1 Risposta
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
con risposta 4 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande