Set Participant Data action failing to persist custom variables in IVR flow

We’ve built an IVR flow that needs to pass custom variables from a REST call into the participant data for later use in routing. I’m using the Set Participant Data action in Architect. The goal is simple. Fetch data from our internal API, then set cust_priority and cust_segment on the participant.

Here is the JSON mapping I’m using in the Data Action:

{
 "cust_priority": "{{$.body.priority}}",
 "cust_segment": "{{$.body.segment}}"
}

The REST call returns a 200 OK with the expected payload. I can see the values in the debug log right after the REST action. When the Set Participant Data action runs, it shows success in the trace. No errors. But when I try to read {{participant.data.cust_priority}} in the next step, it’s null.

I’ve tried a few things:

  • Checking if the keys are case-sensitive. seems to handle lowercase fine.
  • Adding the keys to the Participant Data definition in the IVR settings. They are listed there.
  • Using a Get Participant Data action right after Set to verify. It returns empty for those keys.

The standard attributes like direction and interaction_id work fine. It’s just the custom ones. I’m on the latest version. Is there a delay in persistence? Or do I need to call a specific API endpoint to flush the data? The docs say Set Participant Data handles this, but nothing shows up. We’re losing the context at the routing step because of this. It feels like the data is in a session scope that doesn’t match the participant scope. Any idea why the custom fields are dropping?