Flow variables in condition match reqs

Is it possible to use flow variables in condition match requirements? I am trying to handle input from diff channels (teams, teneo webchat, tryout engine) and I do this with an script that saves the input to a variable. I want this variable to be evaluated with a condition as one the chatbot is also configurued for voice recognition so I want to match with the possible inacuracies of the detection.

Hi @edhorst,

It is possible to use variables in the condition match requirements. There are different ways of doing so:

  • as dynamic syntax
  • as a topic syntax
  • embedding the variable in the condition with curly brackets {myVariable}. In this case the variable will evaluate to true/false or empty/non-empty depending on the variable type

Can you give us a more specific example of the kind of match you are trying to do so we can help assess if you can achieve this by one of the above methods?


I want to use the value stored in “firstbutton” and create a syntax condition that can match even in the case of a “dot” added at the end or if it is misspelled.


I can see that you are using the Script Match Requirement, in which case the round brackets are correct. In Script Match requirements you can do any kind of scripted string comparison that you would do in any Groovy script.
Did you already try to implement this and found that it does not work? Do you have this Match Requirement on a trigger or a transition, and do you have other Match requirements on the same Trigger/Transition? When are you setting the value of firstbutton? Have you checked in the Advanced Tryout if the firstbutton variable has the expected value when this trigger/transition is evaluated?

It works but it will only match with those 2 strings in the evaluation but I would like to match also with common tipying mistakes (or from speech to text discrepancies) . So, for example, I would also like to match with “IXC offerings.” or “IXB opferings.”. That is why I was looking for way to make use of the flow variable in a “condition” match requirement. The evaluation script runs in a transition and the value of firstbutton comes from another previous transition.

After this transition where the flow variable gets a value assigned to it, there is a junction and then later the different options and on them I have the evaluation script provided before.

I have checked that part of the advanced tryout and it does have the expected value but if I use speech recognition and it detects something like “IXB ofperings.”, it will not match and I do want to be able to deal with those mistakes/innacuracies.