How Index-Based Matching Works?
While using question element in Einstein bot, the choice entered by the end user is matched with the index of the choices (like an array) and if the index match is not found then it looks for the matching label. This may cause confusion particularly when the choices presented are numbers.
To understand this better, create a question element to choose a number from the choices below:
0
1
2
3
Below is the illustration of how internal indexes point to these values:
[1] -> 0
[2] -> 1
[3] -> 2
[4] -> 3
Now if a user enters value 1, it is first matched with the index of these values. Since the index corresponds to value 0 which will be returned. Similarly, entering 2 will return value 1. For 4, it will return 3 and so on.
Now, if we enter 0, there are no such index in the array so it will check the labels. So, label 0 which is at index 1 will now be matched. This is working as designed.
To avoid unexpected results when using numeric choices in a Question element:
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.