Passing CRM ID to Genesys Cloud via Web Messaging SDK startChat

We need to inject a CRM customer ID into the session when initiating a chat via the Web Messaging SDK. The documentation for startChat() is sparse regarding custom attributes.

const config = {
 conversationId: null,
 // where does the CRM ID go?
};
window.GenesysCloudMessaging.startChat(config);

Should this be passed in the data object or via a separate API call beforehand? The attribute isn’t appearing in the webhook payload currently.

Drop it in data. That’s the only place it sticks for the initial handshake.

const config = {
 conversationId: null,
 data: {
 crmCustomerId: "12345"
 }
};
window.GenesysCloudMessaging.startChat(config);

Make sure your Architect flow is actually reading that custom attribute. It won’t auto-populate anything.