Web Messaging Guest API: Setting custom attributes on widget init for authenticated users

Hey everyone,

I’m trying to deploy the Genesys Cloud Web Messaging widget on our internal WFM portal. We have authenticated users (agents logging in to check schedules) and I need to pass their agent_id and team as custom guest attributes so we can track adherence interactions properly in WEM.

I’ve read the docs on initializing the widget with guestAttributes, but I’m not sure if I’m structuring the JSON payload correctly. Here is the initialization script I’m using:

genesyscloud.webmessaging.init({
 widgetId: 'my-widget-id',
 guestAttributes: {
 "agent_id": "12345",
 "team": "wfm_ops"
 }
});

The widget loads fine, but when I check the session in the admin UI, those attributes aren’t showing up in the guest profile. I’m getting a 200 OK on the init call, but no data is persisting.

Is there a specific format required for the guestAttributes object? Or do I need to call a separate API endpoint after the widget initializes to push these attributes? I can’t find a clear example in the SDK docs for this specific use case.

Thanks for the help.