Template trigger

Conversation starter / templates redirect

Most chatbots have a start word(s) or just a keyword that can trigger a certain flow to kick in. For example, most chatbots respond when you say hie or start or something similar. These are the triggers in WCE context. They not only work for "greeting" but are very powerful features that can boost your bot intelligence and UX.

Triggers are global, and they are evaluated first when the engine is looking for the next stage to render.

For example. Consider a trigger defined as below

"MAIN_MENU": "re:^start$"

The trigger above mean that, whenever user types start - render the MAIN_MENU template to the user

To define regex triggers, always prefix them with re:.

It's advised to have your triggers as exact regex to avoid unexpected responses 😕.

You can also use a hacky way to redirect users to a specific template if they type your defined trigger shortcut command.

"BOOK_DEMO_STAGE": "re:^book demo$"