Looking for advice on persisting custom guest attributes for authenticated users in the Web Messaging SDK without triggering a full re-initialization on every route change.
We are managing our widget config via Terraform (genesyscloud_messaging_application), but the client-side JS needs to push the session token and user ID to the guest profile after the OAuth handshake completes. Currently, we are calling genesys.cloud.webmessaging.init with a static user object, but it seems to reset when the browser tab is refreshed or the user navigates away from the support portal.
Here is our current initialization snippet:
const widgetConfig = {
orgId: 'our-org-id',
appId: 'messaging-app-id',
user: {
id: 'auth-user-123',
name: 'John Doe',
email: '[email protected]'
}
};
genesys.cloud.webmessaging.init(widgetConfig);
Is there a specific API call or SDK method to update the guest profile dynamically without destroying the existing conversation context? We want to avoid the 409 conflict that happens when we try to re-init with different attributes.