I’ve got a script running on an inbound voice interaction. The goal is simple. Pull some data from our external CRM and attach it as a participant attribute on the current call so the agent can see it later.
The script uses a GetRESTProxy action to hit our internal endpoint. That part works. I get the JSON back. Then I use a Set Participant Attribute action to store the value locally in the script context.
Here is the issue. When I try to push that attribute to the live conversation using the REST Proxy action again, the API call returns a 200 OK. No error. But the attribute never shows up in Genesys Cloud.
I’m using the PATCH method on /api/v2/conversations/voice/{conversationId}/participants/{participantId}. The payload looks like this:
{
"attributes": {
"crm_customer_tier": "platinum"
}
}
I verified the conversationId and participantId are correct by logging them. The token has conversation:write scope. I’ve checked the Genesys Cloud logs and the request hits the server. It just doesn’t stick.
I tried adding "replace" in the options but that didn’t help. I also tried using the Update Conversation Participant action directly in instead of REST Proxy, but I need to pass a dynamic value from the CRM call that the standard action doesn’t seem to handle easily without a lot of variable mapping.
Is there a specific format required for the attributes object? Or is there a race condition where the participant isn’t fully initialized when the script runs? The call is active, so the participant exists.
Here is the REST Proxy config screenshot logic: Method PATCH, URL constructed dynamically, Body is the JSON above. Headers include Content-Type: application/json.
Any ideas why the 200 OK is lying to me?