Web Messaging SDK startChat() not passing custom attributes to conversation metadata

Hey folks,

I’m trying to push a CRM customer ID into the Genesys Cloud Web Messaging session so our WFM team can track specific customer journeys for adherence reporting. We have the ID available in our internal portal, and I want to attach it when the user clicks the chat button.

I’ve been looking at the startChat documentation, but I’m not sure if I should be passing it in the attributes object or if there’s a specific field for CRM integration. I tried passing it as a custom attribute, but it doesn’t seem to show up in the conversation metadata on the backend.

Here is what I have so far:

const config = {
 orgId: 'my-org-id',
 widgetId: 'my-widget-id',
 locale: 'en-US'
};

// Initialize the SDK
Messaging.init(config);

// Try to start chat with CRM ID
Messaging.startChat({
 attributes: {
 customerId: 'CRM-12345-XYZ',
 source: 'internal-portal'
 }
});

When I look at the conversation in the admin portal, the customerId is missing from the custom attributes. The chat connects fine, but the data isn’t sticking.

I’ve tried these steps:

  • Verified the startChat call is firing in the browser console.
  • Checked the Genesys Cloud admin settings to ensure custom attributes are enabled for web messaging.
  • Tried passing the ID in the customAttributes key instead of attributes.
  • Confirmed the token being used has the right scopes.

Is there a specific format I need to use for passing CRM data through the SDK? Or do I need to use a different API endpoint after the chat starts to update the participant data?