Web Messaging SDK custom guest attributes failing on authenticated load

Step one: the portal app needs to inject authenticated user data into the Genesys Cloud web messaging widget before the chat session starts. The goal is to push custom guest attributes so the CXone Studio flow can pull them via a SNIPPET action later. Step two: I’m loading the genesyscloud-messenger-web-sdk and calling setGuestAttributes with a key-value map that includes the customer ID and their loyalty tier. The code looks like genesyscloud.setGuestAttributes({ "customerId": "cust_992", "loyaltyTier": "platinum" }).

The problem is the attributes never make it to the backend. When the flow hits the REST Proxy block to fetch contact details, the JSON response comes back with an empty guestAttributes array. The network tab shows the POST /api/v2/conversations/messaging/contacts firing with a 200 OK, but the request body has stripped out the custom fields.

I’ve tried moving the setGuestAttributes call to run before init() and also after the widget renders. Both approaches yield the same result. The SDK logs show the attributes are registered locally in the browser console, but the API call to Genesys Cloud drops them. The payload hitting the endpoint looks like { "type": "messaging", "externalContactId": "cust_992" } with no attribute data attached.

The docs mention setGuestAttributes but don’t specify if it needs a specific timing relative to the startConversation trigger. No idea why the POST request is sanitizing the body.