Web Messaging SDK startChat not passing CRM ID to Studio session

Trying to inject our internal CRM customer ID into the Genesys Cloud Web Messaging SDK so it shows up in the flow context. The goal is to have the ID available immediately when the chat starts, without waiting for a prompt or transfer.

I’m using the startChat method on the GenesysCloudWebChatSDK client. The docs suggest passing attributes in the sessionAttributes object. Here is the code I’m running on the client side:

const startChat = async () => {
 try {
 const response = await client.startChat({
 sessionAttributes: {
 crmCustomerId: "CUST-998877",
 source: "web"
 },
 conversationName: "Support Inquiry"
 });
 console.log("Chat started", response);
 } catch (err) {
 console.error("Failed to start chat", err);
 }
};

The chat connects fine. No errors in the console. The response object looks normal. However, when I check the flow execution trace, the crmaCustomerId attribute is missing from the sessionAttributes map. I can see the default attributes like channel and timestamp, but our custom key isn’t there.

I’ve tried a few things:

  1. Verified the key name matches exactly what I expect in (case sensitive).
  2. Checked the raw HTTP request payload in the browser network tab. The POST to /api/v2/engagements/convos/chat does contain the sessionAttributes with the CRM ID. So the SDK is sending it.
  3. Tried renaming the key to something generic like testId. Still nothing in .

Is there a specific configuration in the Web Messaging deployment or the flow that needs to be enabled to accept incoming session attributes from the SDK? Or is startChat not the right method for this and I need to use an API call to update the engagement after it connects?

Any pointers would be helpful.