Running into a weird issue with the Genesys Cloud Web Messaging SDK where custom attributes passed during initialization aren’t showing up in the conversation object on the platform side.
We’re building a custom embeddable client app. The goal is to inject the CRM customer ID into the chat session so we can trigger screen pops in the agent desktop. I’ve got the SDK loaded and initialized correctly. The chat widget renders fine, and messages flow back and forth without hiccups.
Here’s how I’m calling the start method. I’m passing the customer ID inside the attributes object as documented.
const gcWebMessaging = require('@genesyscloud/webmessaging-sdk');
const client = gcWebMessaging.createClient({
orgId: 'our-org-id',
deploymentId: 'our-deployment-id',
gatewayUrl: 'https://webchat-eu-west-1.genesys.cloud'
});
client.startChat({
name: 'John Doe',
email: 'john.doe@example.com',
attributes: {
crmCustomerId: 'CUST-998877',
priority: 'high'
}
});
I’ve verified the request payload using browser dev tools. The POST to the gateway includes the attributes object with the crmCustomerId key. It looks correct.
However, when I look at the conversation in Genesys Cloud Admin or check the participant data via the API, those custom attributes are missing. The standard fields like name and email populate fine. It’s like the SDK is stripping the custom attributes before sending them to the platform.
I’ve tried:
- Changing the key name to
crm_customer_id(snake_case) just in case. - Passing the attributes in the
optionsobject instead of directly in the start call. - Checking if there’s a specific configuration in the CXone deployment settings that needs to allow custom attributes. The deployment is set to allow custom data.
Is there a specific format required for the attributes object? Or do I need to map these attributes in Architect before they stick? The documentation is a bit vague on this part.
I’m using SDK version 1.12.0. Any pointers?