ConditionalEventStay organized with collectionsSave and categorize content based on your preferences.
AI-generated Key Takeaways
Conditional events trigger based on a true condition.
Theconditionfield is a required string that acts as a filter, supporting session/user storage references, boolean operators, comparisons, and list/string operators.
The optionaltransitionToScenefield specifies a destination scene to jump to when the condition is true.
The optionalhandlerfield is an EventHandler object triggered when the condition is true, typically used for generating prompts before a scene transition.
Required. Filter condition for this event to trigger. If condition is evaluated to true then the associatedhandlerwill be triggered. The following variable references are supported:$session- To reference data in session storage.$user- To reference data in user storage. The following boolean operators are supported (with examples):&&-session.params.counter > 0 && session.params.counter < 100||-session.params.foo == "John" || session.params.counter == "Adam"!-!(session.params.counter == 5)The following comparisons are supported:==,!=,<,>,<=,>=The following list and string operators are supported (with examples):in- "Watermelon" insession.params.fruitListsize-size(session.params.fruitList) > 2substring-session.params.fullName.contains("John")
transitionToScene
string
Optional. Destination scene which the conversation should jump to when the associated condition is evaluated to true. The state of the current scene is destroyed on the transition.
Optional. Event handler which is triggered when the associated condition is evaluated totrue. Should execute before transitioning to the destination scene. Useful to generate Prompts in response to events.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[],[]]