I have two intents - serviceQuote and gotCar
In serviceQuote intent, user will input 3 parameters - carModel, carPrice and buyDate. And he will receive a quotation according to parameter values.
In gotCar user can say i just bought lamborghini
.
Dialogflow will get carModel and fire up event of serviceQuote. I want to send this carModel value along with and assign it to serviceQuote parameter carModel without prompting to the user.
Please note that question to ask carModel is first in the serviceQuote intent design and all 3 parameters are marked as required.
I have tried to invoke the event and send parameter value along with it. Intent is triggered but parameter value is not being assigned and it is asking the user again for car model.
'followupEventInput' : {
"parameters": {
"carModel": "aston martin",
},
'name' : 'e_serviceQuote',
}
What am I missing? How to achieve it.
I am using DialogFlow v2.
Edit: I tried to enter #e_serviceQuote.carModel
as value of parameter, but Dialogflow console is not allowing me to enter it.
You need to configure #e_serviceQuote.carModel
in the Default Value
for that parameter. That way, it'll be pre-filled with the value from that input context, or be empty if the context does not exist (or if the context exists but it doesn't contain that parameter).
Then, set #e_serviceQuote.carModel
as default value (in my example, it's #appointment.date
)
You just need to assign the value of the followupEvent carModel parameter to the intent's carModel parameter. This means, in your Action and parameters table of the serviceQuote intent, the value of the carModel parameter has to be #e_serviceQuote.carModel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With