Reg: Dialogflow unique id

516 views
Skip to first unread message

nareemani nirjogi

unread,
Jun 10, 2021, 7:00:18 AM6/10/21
to Dialogflow Essentials Edition users
Hello team, 

I am building a bot using Dialogflow ES and integrated it to the backend using NodeJS with fulfillment modules for providing Dynamic responses. To store the data in DB I need a unique id of every user. How to get that? 

Did Dialogflow give any unique id ?

Thanks

Fran (Google Cloud Platform Support)

unread,
Jun 10, 2021, 11:25:21 AM6/10/21
to Dialogflow Essentials Edition users

Hi!

I believe that the best way of getting an identification of every user would be to set up account linking in your bot [1]. Beware that users can also identify as anonymous using this method. 

Kind regards!

--------------------------------

[1] https://firebase.google.com/docs/auth/web/account-linking#web-v8

nareemani nirjogi

unread,
Jun 11, 2021, 9:27:09 AM6/11/21
to Dialogflow Essentials Edition users

Thanks for the answer

It means, is Dialogflow didn't maintain any id for users for identification right? Please correct me If I am wrong
thank you.

Jun Lu

unread,
Jul 26, 2021, 6:50:12 PM7/26/21
to Dialogflow Essentials Edition users
Hey, 

As per the documentation at [1], your system will be responsible for generating unique session IDs while they can be random numbers, hashed end-user identifiers, or any other values that are convenient for you to generate, thus it does not look like Dialogflow would maintain the hashed end-user identifiers if applicable as session data is stored by Dialogflow for 20 minutes. 

However, it seems that you can use the userStorage object which is persisted across conversations when it can identify a user as per discussions at [2] that you can take a look. 

Mizar Contasti

unread,
Aug 7, 2021, 3:02:33 PM8/7/21
to Dialogflow Essentials Edition users
Dialogflow already provide a Session ID. This session is available till the user hasn't continued the conversation about 20 minutes. But if the user is interacting with the bot without a gap of 20 minutes this session id (which is unique) can be used.

Devashish Mamgain

unread,
Aug 9, 2021, 9:47:33 AM8/9/21
to Dialogflow Essentials Edition users
If you are referring to identify the user from your system then from the user interface code, pass the user ID in the webhook request, then you will get the same information in originalDetectIntentRequest field of the webhook request, refer to the docs below:


We have implemented the user identification using this same approach in our product, refer to our docs to get an idea on how to pass and retrieve it https://docs.kommunicate.io/docs/bot-dialogflow-integration#pass-custom-data-to-bot-platform

Reply all
Reply to author
Forward
0 new messages