Olá Hannah,
I beleave your error is happening because the participants field returned by /api/v2/conversations/messages/{conversationId} is an array, not a JSON object.
In your translation map you are trying to access it as if it were an object "$.participants.queue.ID", but since participants is a list, the JSONPath engine expects you to iterate or filter the array first.
Typically, the queue information is found on the ACD participant, so you need to filter the array to find that participant before accessing the queue object.
For example:
$.participants[?(@.purpose=='acd')].queue.id
Your translation map could look like this:
{
"translationMap": {
"queueID": "$.participants[?(@.purpose=='acd')].queue.id"
},
"translationMapDefaults": {},
"successTemplate": "{\"queueID\": \"${queueID}\"}"
}
However, depending on the conversation flow, there may be multiple ACD participants (for example after transfers). If your goal is to retrieve the most recent queue, you might need to handle the returned array and select the last value.
I hope this helps.
------------------------------
Kaio Oliveira
GCP - GCQM - GCS - GCA - GCD - GCO - GPE & GPR - GCWM
PS.: I apologize if there are any mistakes in my English; my primary language is Portuguese-Br.
------------------------------