Slots reset on reload of webpage

I am using rasa webchat for UI integration with website and sending some session data from our website with initPayload of webchat

    selector: "#webchat",
    initPayload: "/get_started{\"empCode\":\""+empcode+"\", \"empName\":\""+empname+"\"}",
    interval: 1000, // 1000 ms between each message

It is working fine after login,getting empCode set in slot ‘empCode’ but after reloading of that page, slots got reset. can anyone explain that why is it happening? how to get slot value of initial conversation after reloading?

1 Like

Just for clarification when you say reload of the page you mean the main website that has your chat connector/widget? What is the behavior set to do currently when the page reloads?

And which slots specifically are being reset? Are they going back to null or some other value?

@btotharye yes the main website that has chat connector specifically, i have not set anything for page reload slots value which i am sending with initPayload in webchat integration code set to null

I guess one of my last questions is where does this initial employee code come from? The issue that is happening here sounds like the way the webchat is setup and loading data into rasa on that first initial load. I’d have to test some of this to know where the breakdown is but it just sounds like when the page reloads its resending this again but you said the slots are reset, so where is that data coming from?

Hey @priya359 ,

How do I make sure the user is set , I want to set slot for userId , which i want to use for making api calls .

I wan to use the slot UserID directly in the file which is set in initpayload

Thank Aashay