Search code examples
dialogflow-esgoogle-assistant-sdk

Dialogflow Intent not matched on clicking from Google Assistant's List View Key, but works when written in Plain Text


I have a certain Intent set-up on Google Dialogflow which matches employee leave-status by a very specific single-word keyword. For example, if the user types "Submitted", it shows that the description stating leave has been in submitted status.

enter image description here

However, when the exact same keyword is selected from a List View of Google Assistant, dialogflow is not able to match the intent.

enter image description here

enter image description here

How is it possible that the same keyword does not match Intent when clicked from a List View, but the same query works in Plain Text?


Solution

  • When a list item(or carousel card) is tapped, it generates an event which will hit your webhook, unlike the simple text message.

    1st way (if your webhook handling the response)

    So you need to handle it in your code.

    Generally, it should have intent as actions_intent_OPTION. from there you need to segregate it.

    2nd way (if your code is not handling the response)

    In this way, your intent must be able to handle actions_intent_OPTION event generated by the list(or carousel).

    for that, your intent need to add the event as shown in below image (Basically it tells the dialogflow that whenever the actions_intent_OPTION events triggered, this intent it capable to handle it, but currently in your case no intent matches the description and it's going to Default Fallback Intent) enter image description here

    So whenever the list item tapped it can handle the flow.

    For more refer this documentation.