New to creating Webhooks and DialogFlow chatbots. I have created a nodejs Webhook in Visual Studios to enable fulfilment in Dialogflow. However, when I have multiple users using the chatbot at the same time, the parameters in the Webhook (not parsed from Dialogflow) are shared among users. How do I alter the Webhook such that each user has their own set of parameters? I am using the Telegram integration in Dialogflow.
Asked
Active
Viewed 88 times
1 Answers
0
The parameters coming from the dialogflow are distinct for each session. If you are storing and modifying the parameters from your webhook locally, you need to use the session id as the unique key for each conversation.

Adi.P
- 370
- 1
- 12
-
Thank you for your answer. Does that mean I have a dictionary stored in my local Webhook code, storing the session id as the key and the parameters as the value? – Vanessa Stanley Oct 13 '22 at 05:29
-
Apologies, I realised I may not have been clear with my question. The parameters I talked about in the question are stored on the nodejs Webhook itself. The idea is that according to the user's response, I will alter the nodejs parameters. These parameters do not need to be parsed to Dialogflow. – Vanessa Stanley Oct 13 '22 at 06:36
-
Then you can use the session info from the incoming webhook request. If you have an express based API, you can intercept each incoming request and use the session parameter from dialogflow to create/retrieve the session in your webhook. – Adi.P Oct 14 '22 at 16:59