I’m trying to pass a CRM customer ID into the Genesys Cloud Web Messaging SDK using the startChat() method. The goal is to have this ID available in the conversation context for WFM reporting.
Here is the code snippet I am using:
const guest = new GenesysWebMessaging.Guest({
orgId: 'my-org-id',
deploymentId: 'my-deployment-id'
});
guest.startChat({
name: 'Test User',
email: 'test@example.com',
customAttributes: {
crmId: 'CUST-12345'
}
});
The chat starts successfully. However, when I check the conversation details via the API endpoint /api/v2/conversations/messaging, the customAttributes field is empty. The name and email fields are populated correctly.
I’ve checked the Network tab in the browser dev tools. The initial POST to the deployment endpoint includes the customAttributes in the payload. But it seems like Genesys Cloud is stripping it out before storing it.
Is there a specific configuration in the Web Deployment settings that needs to be enabled to allow custom attributes? Or is the startChat() method signature different for passing CRM data?
I’ve tried adding the ID to the attributes object instead of customAttributes, but that didn’t work either.