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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ