Hey all,
So, quick question - how is the Users API supposed to handle nested custom fields when updating a user via a Data Action? Because it’s doing jack all right now, tbh.
We’ve got an architect flow that updates a user’s custom field - it’s a JSON blob, specifically a list of strings - using the /api/v2/users/{userId} endpoint with a PATCH request. It was working fine (ish) last week, then someone deployed a change, and now it’s consistently failing with a 400 Bad Request. The response body is… unhelpful. It just says “Invalid request body” with no specifics on what is invalid.
The serializer in the Data Action seems to be flattening the JSON array into a string, which is obviously not what the API wants. I’ve verified the JSON being sent is valid, it’s just the serializer itself is messing it up. I’ve tried setting the content type to application/json; charset=utf-8 and even application/vnd.genesys.cloud.users-v2+json, no dice.
Here’s the JSON we’re trying to send (simplified, obv):
{
"customFields": {
"x_custom_list": ["value1", "value2", "value3"]
}
}
The debugger shows the actual request body being sent looking something like this:
{
"customFields": "[\"value1\", \"value2\", \"value3\"]"
}
See the problem? It’s a string representation of the array, not the array itself.
We’re on Genesys Cloud, architect version is current (as of today, anyway). Newman runs with the latest version of the Postman collection. I’ve also checked the user object in the admin UI, and the custom field is correctly defined as a List/Array type, which makes this even more confusing. iirc, we had a similar issue with createCase a while back - same flattening problem.
Anyone else hitting this? Any clever workarounds that don’t involve building a totally custom API integration (because that’s just… ugh)?