Teneo Developers Community

Globally disable all triggers

For a security reason I need to disable all flow triggers for a certain type of Teneo Web Chat user. Using some logic that run in the Begin Dialog script I can set a boolean variable if the current user is allowed or not. Is there a way to use this to disable all flows without going into each one and set a context restriction? The intended response for disallowed users to any text input can be set in the fallback flow (which is the only flow enabled) depending on the the type of user.

Hi nilst, one possible solution is to use a similar snippet in your Global On Top Script, which prevents all flows outside of a certain folder from triggering. Let’s assume you have the boolean isAllowed set:

if (!isAllowed) {
if (!_.getThisFlow().getFolderPath().startsWith("/Flows")) {
    if (_.activeFlows.size() == 1)

Hope this helps.

Another option could be to give your fallback flow a syntax trigger that checks the boolean. And then add that trigger to an order group that is evaluated before all other order groups and triggers.

So let’s say the boolean set by your Begin Dialog script is called accessDenied and if it has value true, the user should not be allowed to trigger any flow. You would create your fallback flow with a syntax trigger with the condition {accessDenied} and add the response for disallowed users to the answer text.

Then you can add a new order group and place it at the top and add the syntax trigger to that order group. You can find instructions for that here: https://www.teneo.ai/studio/conversations/how-to/create-a-custom-order-group

I didn’t know about the group triggers but that’s a clean way of doing it, thanks!

1 Like