• Public
  • Public/Protected
  • All

Interface QuestionnaireControlInputHandlingProps



Optional customHandlingFuncs

customHandlingFuncs: ControlInputHandler[]


intentToChoiceMapper: function

Function that maps an intent to a choice ID defined in for props.slotValue.

Default: IntentUtils.defaultIntentToValueMapper which converts "AMAZON.YesIntent" to 'yes' and so on. Generally, (.+)*<Value>Intent" -> 'value'.


  • Some simple utterances intended for this control will be interpreted as intents that are unknown to this control. This function allows them to be recognized as answers.
  • Whenever the questionnaire has asked a direct question to the user, e.g. "A: do you like cats?" the subsequent intents will be tested using this function. If it produces a valid answer id the input will be considered an answer to the question.


  • Assume slotType: 'YesNoMaybe' and filteredSlotType = 'Maybe'. An utterance of 'U: yes' will be interpreted as an AMAZON.YesIntent. To ensure that intent can be interpreted as the 'yes' answer to a questionnaire question an intentToChoiceMapper must be defined. The default is sufficient for this case and for most cases that involve intents with conventional naming.

Type declaration

    • (intent: Intent): string | undefined
    • Parameters

      • intent: Intent

      Returns string | undefined