The createConversation call returns a 201 OK, but the conversation details in the Genesys Cloud UI show empty custom attributes. I’m trying to pass specific user metadata from our React frontend before the widget even initializes.
We’re using the @genesyscloud/web-messaging-client SDK. The goal is to have the guest identified and attributed immediately upon connection, rather than relying on post-connection API calls which feels clunky for the user experience.
Here’s the snippet where I set the attributes before bootstrapping:
const guestAttributes = {
userId: '12345',
loyaltyTier: 'gold',
email: 'user@example.com'
};
WebMessagingClient.bootstrap({
organizationId: 'my-org-id',
deploymentId: 'my-deployment-id',
guestAttributes: guestAttributes // This seems to be ignored
});
I’ve tried moving the guestAttributes into the startConversation options object, but that endpoint doesn’t seem to accept them in the payload schema. The docs mention passing them during the bootstrap or initial connection, but nothing shows up in the guestAttributes field of the conversation entity.
- SDK version: 2.1.0
- Frontend: React 18
- Genesys Cloud Org: Production environment
- Custom Attributes: Defined in the Messaging Deployment settings
I expected these to flow through to the conversation record. Instead, I’m seeing null for all custom fields. Is there a specific step I’m missing to ensure these attributes are attached to the guest profile before the conversation starts? The standard userId works fine, but the custom key-value pairs are vanishing.