Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: wording, grammar

...

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:

...

Anchor
CreateBooleanQuestion
CreateBooleanQuestion
Create a Boolean Question

...

We assume It is assumed 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.

  1. Therefore open the Answer Option type tab in the Question properties dialog.
    Image Removed
    Image Added

  2.   Select the type "Boolean".
    Image Removed
    Image Added

  3. The Question card appearance transforms (see image below). The Answer Options "Yes" and "No" are replaced by the option "yes". This default value can be changed afterwards to any other value like in any other Answer Option.
    The only difference is that the Answer Option ID cannot be changed due to internal functional reasons for boolean Questions.
    Image Removed
    Image Added

  4. Afterwards the "yes" Answer Option can be connected to the product values from the related product attribute. The "no" Answer Option is not visible, but implicitly set to all opposite (not connected) values.
    1. See Example Simple Data Binding to learn how to connect the "yes" Answer Option with values from one attribute.
    2. See Example with Complex Data Binding to learn how to connect the "yes" Answer Option with values from multiple attributes.

...

After creating the Boolean Question the "yes" option has to be connected to product attributes. In this example, we describe the Simple Data Binding is described.

  1. We assume that Make sure the Question is already bound to a product attribute (in this case "Bike Type"). If you do not know how to bind an attribute to a Question, please look at the example in page Simple Mapping.
  2. Open the "yes" option properties dialog.
  3. Go to the "Data Binding and Connections" tab (see image below).

    Info

    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.


  4. Choose the attribute value "e-bike" from the selectable value from the combobox.
  5. After the selection the value is attached and the token "e-bike" is visible.
  6. You can add further values by repeating step 4 with other values.

Image RemovedImage Added


Info

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.

  1. We assume that Make sure the Question is already created and the Data Binding Mapping is set to Expression. If you do not know how to set this mapping, please look at the example in page Expression Mapping.
  2. Open the "yes" option properties dialog.
  3. Go to the "Data Binding and Connections" tab (see image below).
  4. Select the attribute "child_safety_lock" and set the corresponding value to "yes". That means that the washing machine should have a child safety lock.
  5. Add another expression by clicking on the "Add Expression" button.
  6. 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).

    Note

    This mathematical condition is only selectable if the attribute "capacity" has the type "Number" (see Upload your Product Data Attributes Table).


  7. Afterwards both attributes and their values are attached to the "yes" option.
  8. Of course you can add further expressions.

Image RemovedImage Added


Info

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.

...