I have a custom Data Action in Genesys Cloud Architect that calls an external REST API to fetch customer loyalty details. The external endpoint returns a 200 OK with a JSON payload. The structure looks like this:
{
"status": "active",
"data": {
"tier": "gold",
"points": 15000
}
}
I want to map data.tier to an Architect variable called loyaltyTier and data.points to loyaltyPoints. Both are defined as String types in the Data Action definition. When I test the Data Action in the UI, it succeeds and shows the values in the response preview. However, when the flow runs for a real user, the variables come back as empty strings or null.
The Data Action JSON mapping section looks like this:
{
"mapping": [
{
"source": "response.body.data.tier",
"target": "loyaltyTier"
},
{
"source": "response.body.data.points",
"target": "loyaltyPoints"
}
]
}
I have tried changing the target types to Number for points, but the string one still fails. I suspect the path syntax might be wrong for nested objects. Is there a specific way to handle nested JSON in the mapping? Or do I need to flatten the response before mapping? The logs show the raw response is correct, so the API call itself is fine. Just the mapping step seems broken.