Einstein ボットで質問要素を使用するとき、エンドユーザーが入力した選択肢は選択肢のインデックス (配列のようなもの) と一致します。インデックスの一致が見つからない場合は、一致するラベルが検索されます。特に提示された選択肢が数値である場合、混乱が生じる可能性があります。
この問題についてより理解するために、以下の選択肢から数値を選択する質問要素を作成します。
0
1
2
3
以下は、内部インデックスがこれらの値を指し示す方法を表した図です。
[1] -> 0
[2] -> 1
[3] -> 2
[4] -> 3
ここでユーザーが値 1 を入力すると、まずこれらの値のインデックスと照合されます。インデックスは値 0 と対応しているため、0 が返されます。同様に、値 2 を入力すると 1 が返されます。値 4 を入力すると 3 が返される、というように続きます。
ここで 0 を入力すると、配列にはそのようなインデックスが存在しないため、ラベルがチェックされます。つまり、インデックス 1 にあるラベル 0 が一致します。これは設計どおりの動作です。
000396914

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.