We are trying to integrate NICE Cognigy profile tokens into our Genesys Cloud flows. The goal is to fetch the user profile from Cognigy and pass it back to Architect for routing logic. I have a Data Action configured to call our internal middleware, which then hits the Cognigy API.
The issue happens when the Cognigy API returns a nested JSON structure. The Data Action fails with a generic “Invalid JSON” error in the logs, even though the response is valid JSON. I suspect the issue is with how the response body is mapped in the Data Action configuration.
Here is the JSON payload returned by the middleware:
{
"profile": {
"userId": "12345",
"preferences": {
"language": "en-US"
}
}
}
In the Data Action, I am trying to map profile.userId to an output variable. The documentation says it should handle nested objects, but it seems to break. I have tried flattening the JSON on the middleware side, but that feels like a workaround.
Is there a known limitation with nested JSON parsing in Data Actions? Or am I missing a step in the mapping configuration? The error log does not give much detail, just “Failed to parse response.” This is blocking our rollout. We need a reliable way to pass complex profile data from Cognigy to Genesys Cloud. Any ideas on how to debug this further?