I am using Dialogflow's Messenger from https://cloud.google.com/dialogflow/docs/integrations/dialogflow-messenger, and was trying to find a way to pass some custom payload to be used during fulfillment. Through HTML customizations, it is possible to pass a user-id which will be passed to DialogFlow through the queryParams.payload field. Is there a way to pass more info other than user-id, through another way?
I was exploring the use of AJAX interceptors to intercept the body of the XHR request to Dialogflow, and am able to intercept the body as {"queryInput":{"event":{"name":"WELCOME","languageCode":"en"}}}
. I was wondering if it would be possible to add a custom payload and retrieve it through fulfillment, such as {"queryInput":{"event":{"name":"WELCOME","languageCode":"en"}},"queryParameters":{"payload":{"payloadkey":"payloadvalue"}}}
to extract the custom payload.
Does anyone know a solution to this?