Genesys Cloud Web Messaging SDK: Passing CRM ID in startChat() attributes

I’ve been wrestling with the startChat() method in the Genesys Cloud Web Messaging SDK for our Android Kotlin app. The goal is to pass a CRM customer ID into the chat session so our Architect flow can pick it up.

The docs mention passing attributes via the StartChatConfig object, but I’m not seeing the data land in the conversation metadata on the backend. Here’s what I’m doing in the Kotlin layer:

val startChatConfig = StartChatConfig.builder()
 .withLabel("Support")
 .withAttributes(mapOf("customerId" to "12345", "source" to "android_app"))
 .build()

messagingClient.startChat(startChatConfig)

The chat initiates fine. The onConversationStart callback fires. I even checked the local Conversation object in the SDK logs, and the attributes look correct there. But when I query the conversation via /api/v2/conversations/messaging/<id>, the attributes field in the response is empty.

Is the SDK stripping these attributes before sending them to the platform? I know there’s a distinction between client-side attributes and platform-side custom attributes. I’ve tried using the customAttributes key in the map instead, but that doesn’t seem to exist in the StartChatConfig builder.

Also, I noticed that if I use the sendText method later in the session with MessageConfig.builder().withAttributes(...), those attributes show up in the message history but not on the conversation object itself. This feels like a gap in the SDK or maybe I’m missing a step in the authentication flow that ties the guest identity to these custom fields.

Has anyone successfully passed a persistent CRM ID through startChat() that survives the transition to the Genesys Cloud backend? I’m using SDK version 1.4.2. The environment is set to us-east-1.

I don’t want to rely on parsing the first message text for the ID since that’s messy and breaks down if the user sends a greeting first.