Table of Contents:
The Boolean type is used if the Answer Options of a Question represent a "Yes/No" or "True/False" choice.
That does not mean that the labels of the Answer Options have to be Yes or No. A possible label representation for a boolean state could be: "I prefer products with reduced prices". That is a boolean decision (either yes or no).
Examples of Questions that might use the Boolean Answer Option Type:
|
Instead of using Boolean Questions, you can of course also use an ordinary Question with e.g. the two Answer Options Yes and No and the Answer Option Type Text. However, the second answer No represents the opposite of the first answer Yes - or data-wise No is connected to the opposite product values than Yes.
That means that in this case the definition of No is redundant. Exactly for that use case the Boolean Answer Option Type can help. With the aid of that type you only have to define the Yes state and the No state is always set implicit with value set. As a result using the Boolean type can save a lot of time and simplifies your configurations.
If you look at the Example with Simple Data Binding the following value sets are defined for both states:
We assume that you have a Question "Do you prefer an e-bike?" with two Answer Options "Yes" and "No". This Question can perfectly be converted into a Boolean Question.
After creating the Boolean Question the "yes" option has to be connected to product attributes. In this example, we describe the Simple Data Binding.
Go to the "Data Binding and Connections" tab (see image below).
Make sure that the product attribute "Bike Type" is visible below the label "Connected Product Attribute from data source:". Otherwise please return to step 1. |
As already mentioned earlier: All non-selected values, e.g. like "Mountain Bike" are automatically attached to the invisible "no" Answer Option. That is why it is unnecessary to implement this state in the Question card. |
Furthermore the Boolean Question can also be used in combination with the Answer Option Mapping Expression. With this mapping the "yes" option can be attached to a more complex combination of different product attributes. So this can be used for example for the Question "Are there babies or small children in your household?" in a washing machine advisor.
Select the attribute "capacity" and set the corresponding value to "6.5". Also make sure that the condition is set to ">=" (greater and equals than).
This mathematical condition is only selectable if the attribute "capacity" has the type "Number" (see Data Attributes Table). |
As already mentioned earlier: All non-selected values, e.g. like "capacity less than 6.5" are automatically attached to the invisible "no" Answer Option. That is why it is unnecessary to implement this state in the Question card. |
If you have configured a Boolean Answer Option Type, the following applies: