Hi all,
We’re having trouble updating participant attributes using a structured message in a Genesys Cloud flow! It’s really strange, and the flow was working just yesterday, so something shifted. ![]()
Basically, we’re using the Web Messaging widget, and when a user sends a message with a specific keyword, it triggers a Data Action that makes a PATCH request to /api/v2/users/{userId}/customattributes. We’re trying to set a custom attribute - wm_last_interaction_type - with a JSON payload. The goal is to store if the last interaction was a “form submission” or “chat message” for reporting.
The flow looks like this: Web Messaging widget → Keyword Trigger → Data Action (PATCH to attribute endpoint). The Data Action config uses a JSON body builder. It looks like this:
{
"attributeName": "wm_last_interaction_type",
"value": "form_submission"
}
Simple, right?! But we’re getting a 400 Bad Request error. The response body is… not very helpful. Just a generic “Invalid request body”. ![]()
The userId is definitely valid. We’ve double checked that it’s being passed correctly from the Web Messaging session. We’re using v2.0.0 of the SDK for this integration, and the flow is in our production environment. We’ve tested with a couple different users and it’s the same result.
We’ve looked at the docs, and it seems like the attribute value should be a string, and we are sending a string! We tried a really simple string value like “test” and still getting the 400.
Interestingly, if we try to update a standard attribute (not a custom one) with a similar Data Action, it works perfectly! That makes me think there’s something funky going on with how we’re handling custom attributes in this scenario.
The logs show this:
2024-02-29T14:33:21.123Z [ERROR] DataActionExecutor - Execution failed: 400 Bad Request - Invalid request body
No other clues there. I dont understand what is happening. We’ve cleared the cache for the integration, and restarted the flow, but no luck. It’s really frustrating! Anyone else run into this recently?
hope this helps someone