1

I have an intent that I want to match in my route, but only if a session parameter also matches. Naturally I setup a route with this intent and a condition that session param must equal foobar.

This works great when the condition matches. However, when the condition doesn't match nothing happens as no routes matches and no event handler will trigger.

The debug agent says that the intent is matched, but since the condition doesn't match the agent will not return anything as there are no routes for it. I would have expected the intent to not be matched at all if there are no routes with matching conditions, that I would instead trigger the "no match" event.

To work around the issue, I then made another route with the same condition but the opposite (does not match). But then I will need to reply something pretending to be a "no match", I'd rather have the event "no match" trigger where I handle this more gracefully.

How do you handle such case properly? Why will an intent match when its only listed in a route that does not match the conditions?

baloo
  • 7,635
  • 4
  • 27
  • 35
  • Hi @baloo, as mentioned in this [documentation](https://cloud.google.com/dialogflow/cx/docs/concept/handler#route), the route requires two things to match, intent and condition which you need to specify while creating the route. For your requirement, there is a [NO_MATCH](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/Match#matchtype) MatchType present which can be used.Let me know if that helps. – Shipra Sarkar Oct 04 '22 at 13:41

0 Answers0