0

In my Dialogflow CX flow I have a Route which answers to some detected Intent.
And here I can type many variations to answer - in Fulfillement section "Agent says". Answer cases

When I use it by API I got only 1 answer (in response.query_result.response_messages), I think randomly selected from all cases.
But I want to get all of my cases and select by my own in my code. Is it possible, is there such a method?
For example, I want to prevent sending user the same answer many times in one dialog.

Zext
  • 25
  • 4
  • Or the best way - adding new dialog options (button Add dialog option on screenshot) in this section? They appear in response.query_result.response_messages. – Zext Dec 22 '20 at 16:04

1 Answers1

1

As far as I know, when you use detectIntentResponse method from detectIntent method, you will have 1 user query to get all of the responses in a particular route page you set from the Dialogflow CX console.

Please be noted that in Dialogflow CX Fulfillment, only 1 response will be returned randomly per Text Dialogue Option (or Agent says section). You can refer here for Fulfillment Static responses.

If you want to return multiple text responses from the Fulfillment section, you will need to add multiple Text dialogue options: multiple text responses

This will have 2 Agent Text Responses returned from the detectIntent method:multiple text responses test

You can then fetch the text responses as an array from the fulfillment responseMessage text object.

Leri
  • 185
  • 5
Mark Jonathan
  • 214
  • 1
  • 2