Passing CRM ID via Web Messaging SDK startChat() not persisting in Genesys Cloud

The startChat() method in the Genesys Cloud Web Messaging SDK seems to ignore the attributes object I’m passing. I need to push a CRM customer ID into the session so our routing logic can pick it up, but the ID never shows up in the conversation details in the Admin UI.

Here is the code I’m using to initialize and start the chat:

const client = new GenesysCloudWebMessaging.Client({
 region: 'us-east-1',
 orgId: 'my-org-id',
 deploymentId: 'my-deployment-id'
});

client.startChat({
 guest: {
 name: 'Test User',
 email: 'test@example.com'
 },
 attributes: {
 crmId: 'CRM-12345',
 priority: 'high'
 }
});

I expected crmId to appear in the participant data or the conversation metadata. Instead, when I query /api/v2/conversations/messaging/{conversationId}, the attributes are empty.

Environment and steps tried:

  • SDK version: 4.2.0
  • Genesys Cloud Region: US East 1
  • Verified the deployment ID is correct by checking the UI.
  • Tried passing the ID in the guest object as a custom field, but that got stripped out.
  • Checked the server logs; the connection is established, but no attribute payload is visible in the initial handshake.

Is there a specific field name required for CRM data? Or do I need to use the sendData method after the chat starts instead? The docs aren’t clear on whether attributes in startChat maps directly to participant data or if it’s just for internal routing hints.