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
질문됨 4년 전1158회 조회
1개 답변
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
답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠