Running into a head-scratcher with the Genesys Cloud Web Messaging widget. I’m trying to inject custom guest attributes for authenticated users before the widget initializes, but they’re dropping off somewhere in the handshake. The docs suggest setting them via the onGuestReady callback or passing them in the config object.
I’ve tried both. Here’s the config approach:
genesyscloud.webmessaging.init({
orgId: 'my-org-id',
deploymentId: 'my-dep-id',
guestAttributes: {
userId: 'user-123',
accountType: 'premium'
}
});
And the callback approach:
genesyscloud.webmessaging.onGuestReady((guest) => {
guest.setAttributes({
userId: 'user-123',
accountType: 'premium'
});
});
The widget loads fine. I can see the conversation start in the Genesys Cloud admin console, but the userId and accountType fields are blank in the conversation details. I’ve checked the network tab, and the initial POST to /api/v2/conversations/messaging doesn’t seem to include these attributes in the payload body. Am I missing a specific API call to sync these after the guest is ready, or is there a known issue with the SDK version 1.2.4? The standard name and email fields work fine, so it’s not a general auth issue.