Just noticed that passing a custom crmId via the startChat() method in the Genesys Cloud Web Messaging SDK seems to silently drop the value before it hits the platform. I am building a custom integration where we need to correlate inbound web chats with our internal CRM records immediately upon session creation.
According to the documentation:
“You can pass additional data to the chat session by providing an object to the startChat method. This data is available in the conversation metadata.”
I have implemented this in my frontend React app using the latest SDK version. Here is the relevant snippet:
const gcSession = new GenesysCloudWebMessagingSession({
orgId: 'my-org-id',
region: 'au',
gatewayUrl: 'https://gateway.prod.au.genesyscloud.com',
clientId: 'my-client-id',
});
gcSession.startChat({
name: 'Test User',
email: '[email protected]',
crmId: 'CRM-12345', // This is the identifier I need
customAttributes: {
source: 'website',
priority: 'high'
}
}).then((chatSession) => {
console.log('Chat started', chatSession);
});
The chat initiates successfully, and I can see the conversation in the Genesys Cloud admin UI. However, when I inspect the conversation details via the API, the participants array does not contain the crmId. The customAttributes are present, but the specific CRM identifier is missing from the participant data structure.
I have verified that the payload is being sent correctly by inspecting the network tab; the initial POST to the gateway includes the crmId. It appears the SDK or the gateway is stripping or ignoring this field during the handshake.
Has anyone successfully passed a persistent CRM identifier through startChat() that survives into the final conversation object? Or is there a specific field name I should be using instead of crmId? I am currently in Sydney, so timezone differences might be affecting my log checks, but the data seems absent regardless of when I query it.