Hi! This is likely a far more advanced topic but I hope someone has done a deep dive into it in the past.
In an effort to automate the mechanism to switch between Kinetic companies I’m having to do a deeper dive into context and session management. The goal is to programmatically perform the switch as the action of clicking between them is cumbersome and slow. I’m also making the assumption that there’s absolutely no way to do this in Application Studio.
As a full-stack developer I’ve been reverse engineering how Kinetic stores the current session context and it seems like it’s a mix between server-side storage and SessionStorage/LocalStorage.
It seems that there’s a SetCompany call available vie the Ice.Lib.SessionModSvc. I can touch the endpoint and supply the company ID which performs the switch and returns a parameters object containing relevant details about the switch and the new company.
I don’t believe I can trigger arbitrary fetch calls with Application Studio so I’m thinking of implementing this as a bookmarklet in the browser.
My questions are as follows:
- Calling the fetch will still require a page refresh, which isn’t ideal. Is there a way to call the switch via the Console (a function trigger or something similar)? I could run that via the bookmarklet. I realize that the SessionStorage needs to ultimately retain the new session info so a fetch + updating Storage is necessary as to not confuse the f/e since they’ll be out of sync.
- Do you foresee any downsides to this method? I’m still reverse engineering the solution and I don’t know what I don’t know yet.
- Is there definitely not an easier way to handle this? Why does Kinetic store session in the database as well as the client, this is a terrible pattern for session management that most modern web applications have moved away from. I imagine it’s a legacy requirement of the classic interface.
Thanks,
David

