Original Message:
Sent: 01-15-2026 12:49
From: Mateus Nunes
Subject: Looking for Jsonpath to collect the last queueId on the conversation.
Try to use JSONPath Online Evaluator
Json Path for queueId: $.participants[?(@.purpose=='agent')].sessions[*].segments[?(@.queueId)].queueId (Take the last id)
Json Path for wrap-up id and name: $.participants[?(@.purpose=='agent')].sessions[*].segments[?(@.wrapUpCode)].wrapUpCode
------------------------------
Mateus Nunes
Tech Leader Of CX at Solve4ME
Brazil
Original Message:
Sent: 01-15-2026 12:31
From: Mahmoud Alshobaki
Subject: Looking for Jsonpath to collect the last queueId on the conversation.
Thank you Joaquin for your input
the Jsonpath $..queueId[-1] didnt work as the queue ID is not an array
I am using used the flowing API
get /api/v2/analytics/conversations/{conversationId}/details
I was able to use the following jsonpath $.participants[?(@.purpose == "acd")].participantName
but it gave me all participantNames with the purpose of "acd"
That help little bit, but i am looing to get the last ParticpantName only, any Idea ??
------------------------------
Mahmoud Alshobaki
Senior Consultant
Original Message:
Sent: 01-13-2026 18:38
From: Joaquin Garcia Fink
Subject: Looking for Jsonpath to collect the last queueId on the conversation.
Hi Mahmoud, let me know if this is what you are looking for:
To get the last queueId using JSONPath, you can use the following syntax:
This breaks down as:
$: represents the root of the JSON document
..: recursive descent operator that searches for the key at any level
queueId: the specific key you're looking for
[-1]: array index selector that gets the last element
Alternatively, if your queueIds are in a specific array and you know the exact path, you can use:
$.path.to.array.queueId[-1]
You can test your JSONPath expressions using online tools like https://jsonpath.com/ to verify the results with your specific JSON structure.
This syntax is based on the standard JSONPath operators where $ is the root element, .. is used for recursive descent to search for a key at any level, and [] is the subscript operator used to access array elements.
------------------------------
Joaquin Garcia Fink
Senior Customer Success Manager
Genesys - Employees
Original Message:
Sent: 01-13-2026 15:18
From: Mahmoud Alshobaki
Subject: Looking for Jsonpath to collect the last queueId on the conversation.
Hi Team,
Can anyone help me how get the Json Path to find the get the last queueId where the call get completed/wrapup from conversation API,
in other way i have conversations ID where the call transferred to many queues so our management they need to get the last queueId where the call get completed, as they need it for survey evaluations options.
Thank you.
#DataActions
#PlatformAPI
------------------------------
Mahmoud Alshobaki
Senior Consultant
------------------------------