I’m trying to pass custom variables through an IVR flow using the “Set Participant Data” action. The goal is to attach a correlation ID from an upstream API call so we can trace the conversation in our OTel pipeline later.
Here is the Data Action JSON mapping I’m using:
{
"action": "setParticipantData",
"inputs": {
"conversationId": "{{conversation.id}}",
"participantId": "{{conversation.participants[0].id}}",
"data": {
"correlationId": "{{inputs.correlationId}}"
}
}
}
The action succeeds with a 200 OK response. No errors in the trace. But when I hit the next node and try to read {{conversation.participants[0].data.correlationId}}, it’s null.
I’ve checked the participant ID. It’s correct. The input variable correlationId is definitely populated. I even tried using the REST API directly to update the participant data via /api/v2/conversations/voice/{{conversationId}}/participants/{{participantId}} with a PATCH request, and that works fine. The data persists.
Is there a delay in propagation for the Data Action? Or am I missing a specific flag in the JSON payload? I’ve tried adding "overwrite": true but that didn’t help.
Any ideas on why the Data Action isn’t persisting the custom attributes?