I’m trying to inject our internal CRM customer ID into the Web Messaging SDK session so it lands in the interaction data immediately.
I’m using the startChat method from the @nice-dcx/web-messaging-sdk. The docs say you can pass a customAttributes object, but nothing is showing up in the Architect flow variables or the conversation history.
Here’s the I’m using:
const config = {
deploymentId: 'my-deployment-id',
customAttributes: {
crmId: 'CRM-12345-TEST'
}
};
const session = await sdk.startChat(config);
I’ve verified the deployment ID is correct. The chat connects fine. I can see the standard browser user agent and IP in the flow data. The crmId is just… gone.
I tried adding it to the userData field as well. Still nothing.
Is customAttributes only for the initial connection handshake and not passed to the flow? Or do I need to use a separate API call after the session starts to attach this data? The SDK version is 4.2.1.
Any ideas on why this specific key-value pair is being dropped?