Web Messaging SDK startChat() customAttributes not persisting to Architect flow

Trying to inject the CRM customer ID into the Web Messaging session using the NICE CXone Web Messaging SDK. The goal is to have that ID available in the Architect flow immediately when the chat connects, so we can route based on customer tier.

We’ve initialized the SDK on the client side. The code looks standard. Here is the calling startChat:

const options = {
 customAttributes: {
 crmCustomerId: "CUST-998877",
 source: "webportal"
 },
 language: "en"
};

window.niceCXoneWebMessaging.startChat(options).then((chatSession) => {
 console.log("Chat started:", chatSession.id);
}).catch((error) => {
 console.error("Chat error:", error);
});

The console log confirms the chat starts successfully. No errors in the catch block. But when I look at the Architect flow, the customAttributes dictionary is empty. Or rather, it exists but the crmCustomerId key is missing. The source key is also gone.

I checked the REST Proxy in the script that handles the initial setup. I’m using GetRESTProxy to pull the participant data. The JSON response from the internal API shows the participant ID, but the custom attributes section is blank. It’s like the SDK isn’t sending them, or the platform is stripping them before the flow starts.

Is there a specific configuration needed in the Web Messaging channel settings in the Admin portal? Or do I need to use a different method than startChat() to pass these attributes? The docs are vague on whether customAttributes in the startChat options map directly to the participant data in Architect.

We’ve tried adding the attributes in the pre-chat form as well, but that feels like a workaround. We want it programmatic. The CRM ID is generated dynamically by our React app before the chat even loads. So the pre-chat form won’t have it.

Any ideas why the SDK call isn’t persisting these values?