# How to reset chatbot slots everytime launched from browser? Multiple users chatting to chatbot?

**URL:** <https://forum.rasa.com/t/how-to-reset-chatbot-slots-everytime-launched-from-browser-multiple-users-chatting-to-chatbot/13175>\
**Category:** Rasa Open Source\
**Created:** [July 19, 2019, 11:14am UTC](https://forum.rasa.com/t/how-to-reset-chatbot-slots-everytime-launched-from-browser-multiple-users-chatting-to-chatbot/13175 "2019-07-19T11:14:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alihejazi](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@alihejazi](https://forum.rasa.com/u/alihejazi)\
**Post date:** [July 19, 2019, 11:14am UTC](https://forum.rasa.com/t/how-to-reset-chatbot-slots-everytime-launched-from-browser-multiple-users-chatting-to-chatbot/13175/1 "2019-07-19T11:14:59Z")

</div>

Hi all,

So I’ve managed to connect a custom front-end for my chatbot.

The UI has javascript code which calls Rasa X API to authenticate the user and send and receive messages from the bot. So far, so good.

The Rasa X server where the Rasa X API is hosted is running locally on my computer on port 5002, and my actions.py script server is running locally on my computer on port 5055. Again, so far, so good…

However, when I re-start my browser to chat with my chatbot again, the slots are not reset from the previous chat, which obviously makes some parts of my stories get skipped when I chat again.

How do I reset my conversation everytime I refresh the page? Can this be done programmatically using Rasa X API? I haven’t been able to do so yet…

Also, how would this extend to having multiple users chatting to the chatbot at once? Since the tracker.db file is saved server-side, how can I have one server (local on port 5002 for now) for _multiple_ users chatting to my chatbot at the same time? Because as it stands, if multiple users connect to the same server, I could fill the single set of tracker slots saved on that one server by messaging the chatbot from multiple clients.

Any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [July 21, 2019, 8:03am UTC](https://forum.rasa.com/t/how-to-reset-chatbot-slots-everytime-launched-from-browser-multiple-users-chatting-to-chatbot/13175/2 "2019-07-21T08:03:46Z")

</div>

Hi @alihejaziu multiple users chatting to the bot is possible out of the box. If you’re using the REST channel you just need to make sure you’re assigning each user a unique user\_id. If you do that for each new session (so including you refreshing), then having a new session every time you refresh is possible as well. The `socket.io` channel has configurable session persistence out of the box as well, so that may be another option

---

<div class="post-metadata">

**Author:** ![alihejazi](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@alihejazi](https://forum.rasa.com/u/alihejazi)\
**Post date:** [July 22, 2019, 9:00am UTC](https://forum.rasa.com/t/how-to-reset-chatbot-slots-everytime-launched-from-browser-multiple-users-chatting-to-chatbot/13175/3 "2019-07-22T09:00:34Z")

</div>

Hi @akelad. Thank you so much for your response. If possible, could you please tell me how to “assign each user a unique user\_id”. I’m struggling to find out how using the documentation.

Your help is greatly appreciated.

Thank you!

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [July 22, 2019, 11:56am UTC](https://forum.rasa.com/t/how-to-reset-chatbot-slots-everytime-launched-from-browser-multiple-users-chatting-to-chatbot/13175/4 "2019-07-22T11:56:24Z")

</div>

that’s something you have to handle in your frontend. You then hit the rest api by sending the sender id you generated, along with the messages they send

---

<div class="post-metadata">

**Author:** ![alihejazi](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@alihejazi](https://forum.rasa.com/u/alihejazi)\
**Post date:** [July 22, 2019, 2:06pm UTC](https://forum.rasa.com/t/how-to-reset-chatbot-slots-everytime-launched-from-browser-multiple-users-chatting-to-chatbot/13175/5 "2019-07-22T14:06:12Z")

</div>

Thank you for the help.

---

<div class="post-metadata">

**Author:** ![gandharv30](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@gandharv30](https://forum.rasa.com/u/gandharv30)\
**Post date:** [May 14, 2020, 8:13am UTC](https://forum.rasa.com/t/how-to-reset-chatbot-slots-everytime-launched-from-browser-multiple-users-chatting-to-chatbot/13175/6 "2020-05-14T08:13:53Z")

</div>

hey, I am facing the same issue. Were you able to figure this out?

---

<div class="post-metadata">

**Author:** ![neetumanuel](https://avatars.discourse-cdn.com/v4/letter/n/2bfe46/32.png) [@neetumanuel](https://forum.rasa.com/u/neetumanuel)\
**Post date:** [January 15, 2021, 4:45am UTC](https://forum.rasa.com/t/how-to-reset-chatbot-slots-everytime-launched-from-browser-multiple-users-chatting-to-chatbot/13175/7 "2021-01-15T04:45:58Z")

</div>

I am trying to set new session key every time user comes back in Slack channel. How to identify a new session of user ?

---

<div class="post-metadata">

**Author:** ![bharath-madduri](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/bharath-madduri/32/18010_2.png) [@bharath-madduri](https://forum.rasa.com/u/bharath-madduri)\
**Post date:** [July 13, 2021, 7:34am UTC](https://forum.rasa.com/t/how-to-reset-chatbot-slots-everytime-launched-from-browser-multiple-users-chatting-to-chatbot/13175/8 "2021-07-13T07:34:41Z")

</div>

can you show us the url on how you are passing the data to rasa from your front end(mostly it will be in js), for my custom widget for time being , i am generating random numbers and assigned it as user id to rasa.
