You can access the details you need here: setContextProvider (Omnichannel for Customer Service JavaScript API reference) | Microsoft Learn. It is essential to set the context once the chat is active. Below is an example of how I implemented this in Power Pages: