-
Notifications
You must be signed in to change notification settings - Fork 39
fallback
Nikita Voloshin edited this page Mar 10, 2021
·
4 revisions
Each time the user sends a request that can't be handled by any state of the scenario, a fallback state will be activated without a changing the current dialogue's context.
val MainScenario = Scenario {
state("state1") {
activators {...}
action {...}
}
fallback {
reactions.say("Sorry, I didn't get that. Could you repeat please?")
}
}
Fallback state doesn't change the current dialogue's context meaning that the next user's request will be processed in the same context as a previous one.
It's possible to use fallback
as an inner state:
val MainScenario = Scenario {
state("state1") {
activators {...}
action {...}
fallback {
reactions.say("Okay!")
}
}
fallback {
reactions.say("Sorry, I didn't get that. Could you repeat please?")
}
}