Search code examples
dialogflow-es

Dialogflow intent triggering only if value of Entity matches


I have an entity called 'Vehicle', inside there are different values like 'Car', 'Motorcycle' or 'Truck'. I want the intent to trigger only if detects a Entity Vehicle with value 'Truck'. In this pic I show the configuration of my intent. The problem is that will trigger with any value which is a Vehycle

How can I fix it without using fulfillments?


Solution

  • Don't use entities in this case. The issue is that an entity will match any instance of that entity.

    If you only want to match 'Truck', add that in your training phrases and then add a parameter named Vehicle with the value Truck, without using an entity. Like so: Vehicle parameter without entity

    Notice that Truck is not highlighted and the Entity field is empty.