We’re trying to push a custom variable userSegment from an Azure Function webhook into the Genesys Cloud IVR flow using the Set Participant Data action. The docs say you just need to map the JSON payload to the participant data attributes. But the variable is coming up null in the downstream flow blocks.
Here’s the payload we’re sending via the .NET SDK to /api/v2/flows/executions:
{
"flowId": "my-flow-id",
"inputs": {
"participantData": {
"userSegment": "VIP"
}
}
}
The flow starts fine. No errors. But when I check the logs in Architect, userSegment is empty. I’ve tried mapping it directly in the Set Participant Data action using the expression ${inputs.participantData.userSegment}. Also tried just ${inputs.userSegment}. Nothing works.
Is the participantData object supposed to be nested differently? The SDK docs for FlowExecutionRequest don’t really clarify the exact structure for passing custom variables through to participant data. We’ve got async/await wrapped around the call, so it’s not a timing issue.
Also, I noticed that if I use a standard input field instead of participant data, it works. But we need it on the participant level for routing rules later. Anyone got this working with the .NET client?