Search code examples
carouseldialogflow-es

After displaying a Carousel card in Dailogflow, I want to select one of the lists by voice operation


Tell us about Dailogflow. In the settings of Intents, it was set to display the Carousel card of GoogleAssistant in the response.

I've been able to display the carousel card, but I want to select one of these cards by voice action and open the URL set for that card.

I couldn't find it in the reference, so please let me know if there is a way to achieve this.

If this is not possible, is there any other way to achieve equivalent content?

I don't have good English.Thank you for reading.


Solution

  • You can use follow up intent. So when you are displaying a list or carousel card and you want to make this selection by click and as well as by user utterance. You have to add two follow up intent one for selection one for text utterance.

    consider below example: ShippingOption intent displays a list and that can be selectable as well as get the response by user utterance.

    enter image description here

    app.js

    intentMap.set("shippingOptionIntent", shippingOptionIntent);
    intentMap.set("shippingOptionIntent - select", shippingOptionIntentSelect);
    intentMap.set("shippingOptionIntentChoose", shippingOptionIntentChoose);
    

    Now set the utterance for followup intent:

    enter image description here

    Where another followup intent responsible for user selection by clicking on the option. It has the google assistant option event.

    enter image description here

    So, in this way you can handle both types of responses.