How to set unique id and extract it to perform custom actions

Hi everyone, I have created a website where everyone has to login before they interact with the bot, and after authentication when they interact I want to display custom output based on the user. For example leave balance if user asks for leaves it will be different for everyone so how do I achieve this. How do I set custom unique/sender id and extract it and store it.

Hi @Seven, welcome to the Rasa forum!

You could use slots for this, and customize ActionSessionStart to set the necessary slots at the beginning of the conversation.

Hi @fkoerner, can I use metadata instead to send extra information in the json post request and get the metadata as well as the output from the rasa at the endpoint. If yes, then can you please guide how I can achieve this.

Yes, you can! This other forum post has some guidance on how to do this.

Hi @fkoerner,

Would you mind if ask you a follow-up question? I have difficulties understanding how I can ensure that the slot with the username is aligned with senderID. E.g. in the following scenario, I would have a login page and get username and could I then pass this username somehow to my trackerstore so that when the user enters the page the next time and logs in I know who it is and have all slots saved for this user. Could you explain me which function I would need to rewrite in order to ensure that I have the username linked to one user in my trackerstore? So basically that I can use the username as an identifier when starting a new conversation…