Running into a weird issue where participant attributes set mid-conversation via the JS SDK seem to disappear or fail to persist on the server side. We’re building a custom agent assist tool that needs to tag participants dynamically based on intent detection. Using the conversationsApi.conversationsInteractionsParticipantsPatch method with a valid access token. The request returns a 200 OK, which usually means success, but when I immediately fetch the participant details via conversationsInteractionsParticipantsGet, the custom attributes aren’t there. Or sometimes they are there for a split second and then vanish.
Here’s the payload structure I’m sending:
const updateBody = {
participantId: 'uuid-of-participant',
attributes: {
'intent_score': '0.95',
'detected_intent': 'refund_request'
}
};
await client.conversationsApi.conversationsInteractionsParticipantsPatch(
interactionId,
updateBody
);
I’ve verified the interactionId and participantId are correct. The standard attributes like role or state update fine if I include them. It’s specifically the custom attributes object. I’ve checked the API docs and it says PATCH should merge the attributes. Maybe there’s a type mismatch? The SDK types define attributes as object, but maybe the backend expects a specific string-keyed map? I’ve tried serializing it manually too, no luck.
Also, I’m noticing that if I do this via the raw REST endpoint using axios with the same headers, it works fine. So it might be something in how the SDK serializes the request body or handles the merge logic for nested objects. Anyone else hit this with the latest version of the JS SDK? Checking the network tab shows the request body is being sent correctly, so it’s not a network issue. Just wondering if there’s a known bug with the attribute merging logic in the SDK client.