Search code examples
dialogflow-esdialogflow-cx

Dialogflow CX Page Fulfillment Response Text Parameter Is List (ES users may know the answer as well)


I have a parameter that is defined as a list. When I reference that parameter in the "Agent Says" box, a la the quick start guide, I get the list with brackets in the agent response text.

Fulfillment Response Text: That's a $session.params.supported_toppings pizza.

Agent Simulator Response: That's a [pepperoni] pizza.

I've been all over the documentation for CX and ES, but I can't seem to find any way to unpack the list outside of creating a webhook (which I'm trying to avoid for reasons). Any ideas?


Solution

  • I have checked today the behavior of static responses when referencing parameters and it seems that we can now display the list of values for a certain parameter without the square brackets in the responses.

    Here’s the format: $session.params.parameter-name I’ve used to display the list in the responses. The result of the test is as follows. CX agent isList

    Moreover, for Dialogflow ES Edition, it is supported. It returns the list of values for a certain parameter using the format $parameter-name. Here’s an example for ES agent: ES agent isList