Web Messaging SDK: Passing CRM customer ID via startChat()

What’s the correct way to pass our internal CRM customerId into the conversation metadata using the Genesys Cloud Web Messaging SDK? I’m building a custom React wrapper and need this ID visible to agents immediately upon chat start. I’ve tried passing it in the guestAttributes object within the startChat() call, but it doesn’t seem to persist on the conversation object on the backend. Here’s the relevant snippet:

client.messaging.startChat({
 guestAttributes: { crmId: "12345" }
});

Am I missing a configuration step?

guestAttributes is the right spot, but the backend might not be syncing them to the conversation object immediately. Check your Architect flow. You might need to explicitly map those attributes to custom attributes on the contact. Here’s what I’d check:

  • Verify the attribute names match exactly in Architect.
  • Ensure the conversation object has the corresponding custom attributes defined.
  • Log the webhook payload to confirm Genesys received the ID.