startChat attributes not persisting to Analytics API for Snowflake extraction

Does anyone understand why the crmId attribute vanishes?

  • i’m calling genesys.cloud.messenger.startChat({ attributes: { crmId: '998877' } }) from the embed
  • checked the raw webhook payload, attributes.crmId is missing entirely
  • tried stuffing it into routingData instead, same result, analytics api just returns null for custom attrs
  • snowflake job is choking on missing keys now, need this data for the SLA calc
  • docs mention attributes but nothing on guest-side persistence quirks

I think the Messenger SDK doesn’t push custom attributes to the analytics store by default. it treats them as transient client-side data unless you explicitly map them in the Web Messaging profile.

  1. go to Admin > Omnichannel > Web Messaging.
  2. open your profile and find the “Data Mapping” section.
  3. map the attributes.crmId field to a specific custom attribute slot in the conversation payload.
  4. save and redeploy the embed script.

the analytics API (/api/v2/analytics/conversations/summary) only ingests fields that are persisted in the conversation object’s customAttributes array. if it’s not mapped, it never leaves the client.

here’s what the mapping config should look like in the profile JSON:

{
 "dataMapping": {
 "customAttributes": {
 "crmId": "{{attributes.crmId}}"
 }
 }
}

don’t rely on routingData for downstream analytics either. that’s strictly for skill-based routing decisions at the edge. once the chat is accepted, that data evaporates unless you copy it manually via a flow script. check your Snowflake job after a test chat. if it’s still null, your profile version might be cached. force a hard refresh on the client side.