Rohit
Rohit

Reputation: 35

Dialogflow Slots Via Mutiple Call

In Dialogflow Agent I've one of the intents with multiple slots and all of them are required. It's not possible to provide information for all the slots at once.

e.g.

I've an intent with three slot : i) Email ii) Phone iii)Date of Birth(DOB)

The way i want it to work is ask for email , user's provides an Email , then ask for phone and then DOB. I'm using Dialogflow NodeJS Client API to make request to Agent.

As of now when i make the first request(passing query/utterance) to detect the intent , it detects the intent , now when I pass the value the slot it goes to default fallback.

Also , using webhook for slot filling is not an option for me as the agent is going to be invoked by the client api.

I tried using events instead of queryText but couldn't get it working either.

Upvotes: 0

Views: 68

Answers (1)

Rohit
Rohit

Reputation: 35

Found the Answer, Initially i was the sample code provide with the Dialogflow library(Dialogflow NodeJS ). The problem was for every request a new sessionId was generated , when sessionId was same the slots were filled.

So instead of using the UUID to generate a sessionId for every request , i'm passing the sessionId along with the query to form the request body.

Upvotes: 1

Related Questions