Hi All,
I am new to Dialogflow CX.
Trying to create a bot which can help teams ask FIPS/STIG's related questions.
When there is a `no-match`Intent, i have provided a default Agent response to the user and also trying to relay the user's query to a webhook. (Standard).
How can i grab the username who is trying to interact with the bot. And use that username in the webhook payload. I don't seem to get the username details in the Standard payload response that the Dialogflow CX sends when invoking the webhook
For names/ usernames dialogflow is a bit tricky. Due names can be everything, you can use the sys.person entity for English names or, sys.any in a form filling session (this one will help you to get the username, and then take from sessionParameters on the webhook response payload)
hey @Mizar ,
Thanks for your response.
Just to be clear,
The webhook is a google cloud function, which sends a message to one of the Google Chat Spaces.
Whereas the bot interaction is happening via an App (also from Google Chat).
My question is, where am i extracting the username here from the Google Chat or in Chat with the Bot ? And if i have to provide sys.person on the request parameter.
Is this how i do it ?
`https://your-webhook-service.com/handler?f=$session.sys.person`
Reference -
https://cloud.google.com/dialogflow/cx/docs/concept/webhook#webhook-request
Hi @bluejay820 when df takes fills the parameter is automatically set in the session attribute of the payload.
If you can catch the request and echo it in a file you can see something like this.
For more help, please save the request and show it to us here.
According to the URL you sent, it is not necessary to add the URL, the webhook URL shouldn't change. Dialogflow automatically will save the parameters in the webhook, if they were caught in the conversation.
Just use your common www.webhook-url.com and then try to get the request
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |