I want to intercept the request from dialogflow messenger CX and add parameters to responseBody by queryParams, I have read the documentation but it is not clear about how to add the new parameters using javascript event. I understand that there is a event called df-request-sent but the documentation doesn't show about how to send the new parameters in the event. I have searched similar question but i didn't find information.
I am using the next documentation: https://cloud.google.com/dialogflow/cx/docs/concept/integration/dialogflow-messenger#df-request-sent
The code is:
const dfMessenger = document.querySelector('df-messenger')
dfMessenger.addEventListener('df-request-sent', function (event) {
console.log(event)
// how to send the new parameters?
})
I have tried changing the value of event.detail but it didn't work.
Anybody know how to do it?
Thanks for your help.