How to set a unique ID for every user in REST channel

Hi Everyone, I am working on a web based bot using rest. Using this api like http://localhost:5005/webhooks/rest/webhook i creating a web-based bot using Recat js. It is working fine.

But my problem is set a unique ID for every user in web. For example I have a form like name,email,phoneNo and location. I am filling the form in my system, I giving only name and email and stopped. Another user opened bot in another system and user give hi then bot giving continuing the conversation like bot asking phone number.

How to solve the problem. Please help me

Thanks in advance

Not 100% sure, if I got it right, but you have to make sure, that every user gets a unique sender id, which is the identifier for rasa, which is send in the request body. You could probably just give a running index to every user.

I am not using Webchat. I am using my own web base bot. Here Every user sender is rasa But i want a unique Id for each user.

Just I want create a random digits for each user

Do all your request bodies look like this?

{“sender”:“rasa”, “message”:“your message”}

How should rasa seperate different user’s with this information? You have to give every user a seperate sender id from wherever you send this request. Thats not a RASA problem.

1 Like