We are experiencing an issue where custom attributes passed via the startChat method in the Genesys Cloud Web Messaging SDK are not appearing in the conversation transcript or the associated user profile in Genesys Cloud. The environment is https://api.mypurecloud.com and we are using SDK version 2.45.0.
The goal is to pass a CRM Customer ID from the website context into the Genesys Cloud session so that our routing scripts can identify the customer immediately. We have configured the customAttributes object within the startChat call as per the documentation. The code snippet looks like this:
const chatClient = await PureCloudPlatformClientV2.init({
basePath: 'https://api.mypurecloud.com',
accessToken: token,
});
await chatClient.chatApi.startChat({
chatRequest: {
language: 'en-US',
customAttributes: {
'crmCustomerId': 'CUST-998877',
'source': 'website-v2'
}
}
});
The API call returns a 201 Created status, and the chat session initiates correctly. However, when we inspect the conversation via the /api/v2/conversations/messages endpoint, the customAttributes object is empty. querying the user profile for the guest ID does not show the crmCustomerId attribute.
We have verified that the attributes are not being stripped by any middleware. The issue seems to be specific to how the SDK serializes the customAttributes payload during the initial handshake. We have also tried passing the attributes as a flat object instead of nested, but the result remains the same. The attributes appear in the local debug logs but never reach the Genesys Cloud backend.
Is there a specific configuration required in the Genesys Cloud admin console to allow custom attributes from the Web Messaging SDK? Or is there a known limitation with the startChat method in this SDK version regarding custom data persistence? We need this data for routing logic, so it is critical that it survives the session initialization.