We have an in-house OpenCTI adapter that we use with salesforce. It's primary responsibility is to find associated records and pop the results when a new call comes in.
We have a tendency to have Salesforce open in a number of tabs at once. We quickly found that screen popping in all of these windows was not what we desired.
To solve this problem, we added an enable/disable checkbox to our OpenCTI screen. This way, a user can designate one window as the window to allow screen pops in.
The problem we're encountering is that this checkbox loses its value every time the user navigates to a new page (or pops). Our initial thought was to save the checkbox state in the browser localStorage, but we need to somehow make sure that the state saved is local to the current browser window so that the saved checkbox state isn't shared between all open windows.
To do this, it seems that we need a way to identify the current window, but this doesn't seem possible with cross-domain browser restrictions. We are also failing to find any sort of unique identifier that is tied to the current browser window and is passed by Salesforce to our IFRAME or through any of the OpenCTI JS library calls.
Is anyone aware of a solution to this problem? Can it be solved somehow in the APEX domain? Is there a better workaround?