Alen Davis
Alen Davis

Reputation: 11

Handling Multiple Parameter Extraction and Conditional Fulfillment in Dialogflow CX

I'm working with Dialogflow CX and encountering an issue where only one parameter is being extracted from user input, which causes the agent to repeatedly ask for the second parameter. I need to capture all relevant parameters from the start to ensure accurate fulfillment.

Here’s what I’ve tried:

Created two parameters and added respective fulfillment responses. Tested the setup, but noticed that only the first parameter is being extracted, and the agent keeps asking for the second parameter. The main idea is that I want the agent to capture all the entities from start to end. For instance, a user might provide information for both parameters in a single response. In my case, if the user answers the question for the second parameter, it should be extracted and fulfill the intent accordingly.

Example Conditional Fullfilment:

enter image description here page with parameters and parameter Initial prompt fulfillment.

if $session.params.date = null
  Can you provide the date?
elif $session.params.time = null
  Can you provide the time?
else
  Thank you provide me date and time.
endif

Entities: Date and Time Scenario 1: User says "12-12-2023" — the agent asks for the time. When the user says "7 PM," the agent responds with a thanks message. Here, each parameter is extracted separately. Scenario 2: User says "12-12-2023 7 PM" — the agent should extract both the date and the time in one go. However, in my current setup, only the date is being extracted, and the agent continues to ask for the time, instead of responding with a thanks message.

How can I configure Dialogflow CX to ensure that it captures all parameters from a single user response and processes them correctly?

Upvotes: 1

Views: 134

Answers (1)

Bhawna Sharma
Bhawna Sharma

Reputation: 11

You can use the below steps: 1.Try using the dialogflow cx system entities to get the time and date - @sys.date-time or for separately collecting - @sys.date , @sys.time 2.Use the training phrases for the intent depending on your input collection sequence. For example: "The date i want is 02-september-2024 and time 4:30 PM" select and mark the date as @sys.date type and time as @sys.time

Add at least 5-6 training phrases with the possible user inputs in the intent.

Upvotes: 1

Related Questions