Data Action returns an array of array and Architect does not work

Hi

I would like to use the api "/api/v2/analytics/conversations/details/query" as a Data Acion with active calls and some details.

The response from this data action is as follows to obtain the segment's sessions:

{
"translationMap": {
"ID_LLam_Original": "$.conversations[0].conversationId",
"total": "$.totalHits",
"SEGMENTO_4": "$.conversations[3].participants[?(@.purpose=='station')].sessions[0].segments",
"SEGMENTO_3": "$.conversations[2].participants[?(@.purpose=='station')].sessions[0].segments",
"HoraLLamada_Entrante_EnExtension": "$.conversations[0].participants[?(@.purpose=='station')].sessions[0].segments[?(@.segmentType=='interact' || @.segmentType=='alert' || @.segmentType=='hold')].segmentStart",
"HoraLLamada_Fin_EnExtension": "$.conversations[0].participants[?(@.purpose=='station')].sessions[0].segments[?(@.segments[?(@.segmentType=='interact' || @.segmentType=='alert' || @.segmentType=='hold')].segmentEnd",
"SEGMENTO_2": "$.conversations[1].participants[?(@.purpose=='station')].sessions[0].segments",
"SEGMENTO_1": "$.conversations[0].participants[?(@.purpose=='station')].sessions[0].segments"
},
"translationMapDefaults": {
"ID_LLam_Original": ""none"",
"total": "0",
"SEGMENTO_4": "["None"]",
"SEGMENTO_3": "["None"]",
"HoraLLamada_Entrante_EnExtension": "["None"]",
"HoraLLamada_Fin_EnExtension": "["None"]",
"SEGMENTO_2": "["None"]",
"SEGMENTO_1": "["None"]"
},
"successTemplate": "{"total":${total},"ID_LLam_Original":${ID_LLam_Original},"HoraInicio":${HoraLLamada_Entrante_EnExtension},"HoraFin":${HoraLLamada_Fin_EnExtension},"SEGMENTO_1":${SEGMENTO_1},"SEGMENTO_2":${SEGMENTO_2}},"SEGMENTO_3":${SEGMENTO_3}},"SEGMENTO_4":${SEGMENTO_4}}"
}

It publishes correctly, but cannot make it work in Architect, as it in jsonpath is like this:

[
[
{
"conference": false,
"segmentEnd": "2023-03-17T11:58:26.903Z",
"segmentStart": "2023-03-17T11:58:24.446Z",
"segmentType": "alert"
},
{
"conference": false,
"segmentEnd": "2023-03-17T12:00:16.249Z",
"segmentStart": "2023-03-17T11:58:26.903Z",
"segmentType": "interact"
},
{
"conference": false,
"disconnectType": "transfer",
"segmentEnd": "2023-03-17T12:00:30.488Z",
"segmentStart": "2023-03-17T12:00:16.249Z",
"segmentType": "hold"
}
]
]

It is an Array of Arrays.

I can see in Architect this error: "Action success, failure, or output information could not be loaded."

Thanks
Francesc

Could you post an export of your action and an example of the response you are getting from the endpoint (You can get that by expanding the "Execute" step in the test mode UI).

Feel free to redact any sensitive information, but the shape of the data needs to remain unchanged.

--Jason

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.