Genesys Cloud Web Messaging SDK: Custom guest attributes not persisting for authenticated users

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.

The SDK doesn’t push customAttributes directly to the participant profile on createConversation. It sends them as a message payload first. If the flow doesn’t explicitly grab those attributes and apply them to the participant via a REST proxy or Set Participant Attributes action, they vanish after the initial handshake.

You need to intercept that in Studio. Here is the pattern that actually sticks.

// In your Studio Flow, after the Conversation Created trigger
// 1. Grab the custom attributes from the initial message
ASSIGN customData = GetMessagePayload("customAttributes")

// 2. Apply them to the participant using the REST Proxy
// Note: The proxy needs 'conversation:write' scope
ASSIGN proxy = GetRESTProxy("participant-attrs")
ASSIGN body = {
 "attributes": customData
}

// 3. PATCH the participant
ASSIGN result = proxy.patch(
 "/api/v2/conversations/webchat/{{conversation.id}}/participants/{{participant.id}}",
 body
)

Make sure your REST proxy definition has the correct scope. If you’re just passing a CRM ID, you can also use the native Set Participant Attributes action, but the REST proxy is more reliable for complex JSON structures. The SDK sends the data, but the flow has to save it.