Trying to push custom variables from an IVR flow into the active interaction using the Set Participant Data action in Architect. The docs are light on specifics for the JSON structure required when using the REST API directly or when mapping via the UI’s advanced options.
Here’s the setup: I have a data action that calls an external endpoint to fetch user preferences. I need to pass that data back to the IVR flow so I can use it in subsequent prompts. I’m using the Set Participant Data action with the ‘Participant ID’ set to the current interaction’s participant.
The issue is the payload format. I’ve tried:
{
"participantId": "{{currentInteraction.participantId}}",
"data": {
"custom": {
"user_pref": "{{dataActionResponse.preference}}"
}
}
}
And also:
{
"participantId": "{{currentInteraction.participantId}}",
"customData": {
"user_pref": "{{dataActionResponse.preference}}"
}
}
Both result in the variable being available in the flow but not persisting correctly or being accessible in the next prompt. The flow logs show the action completed successfully, but when I try to reference {{currentInteraction.participantData.custom.user_pref}} in the next prompt, it’s undefined.
Is there a specific key structure I’m missing? Or is this a known limitation with how Architect handles custom data in IVR flows? I’ve checked the API docs for /api/v2/conversations/participants/{participantId} but the response structure doesn’t clearly map to the Architect action’s input requirements.
Any insights on the correct JSON payload or a working example would be appreciated. I’m looking for a concrete example that works in the current platform version.