Hey folks,
Running into a headache with a Data Action in Architect. I’m trying to fetch a user’s profile token from NICE Cognigy via a custom HTTP endpoint. The flow is straightforward: trigger the action, send a POST to our middleware, get the JSON back, and map it to a variable.
The weird part is the error. The HTTP call itself succeeds with a 200 OK. I can see the response in the trace logs. It looks like valid JSON. But the Data Action fails with a generic Invalid JSON error during the mapping phase.
Here’s the payload I’m getting back:
{
"status": "success",
"data": {
"profileToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 3600
}
}
I’m mapping response.data.profileToken to a string variable called cognigyToken. Simple enough, right? But it keeps bombing out. I’ve tried wrapping the response in a string variable first and then parsing that, but the Data Action UI doesn’t really let you do complex parsing steps inside the mapping config. It just wants to map field to field.
Is there a known issue with nested objects in the Data Action response parser? Or am I missing something obvious about how Genesys Cloud handles the content-type header? I’m returning application/json from the endpoint.
Tried adding a Studio snippet to GetRESTProxy and manually parse it using JSON.parse, but that feels like a hack for what should be a native feature. Plus, I’d rather keep the logic in Architect if possible for easier handoff to the ops team.
Any ideas on why the parser is choking on this? It’s driving me nuts because the same endpoint works fine in Postman and our Python scripts.