0

I'm trying to create an intent with a 'required' parameter that will prompt a response once the parameter is not satisfied. Is this possible through Node.js? If yes, how could I execute this. Thank you!

McD
  • 29
  • 5
  • Hello, Could you please share if the scenario that you would like to accomplish is this one when creating the agent? Meaning that when some required parameter is not supplied, the agent will keep asking until it has collected all required data from the end-user. [Example](https://cloud.google.com/dialogflow/es/docs/intents-actions-parameters#required) – davidmesalpz Jul 13 '21 at 15:05
  • Yes, that's exactly the scenario that I'm trying to build. – McD Jul 14 '21 at 02:50

1 Answers1

1

You can set parameters as "required" using the Node.js client library:

For Dialogflow ES, when creating an Intent using the createIntent method, set the request.intent.parameters.mandatory field to “true” for the parameter you want to be required.

For Dialogflow CX, when creating a Page using the createPage method, set the request.page.form.parameters.required to “true” for the parameter you want to be required.

Mark Jonathan
  • 214
  • 1
  • 2