I am looking to fetch last agent participant id from conversationId. Below topic helped, however it is not working when we have two agent participant ids.
example: when a customer replied to advisor response and it answered by other advisor, we will have two agent participant Ids.
$.participants[?(@.purpose=="agent")].id this condition results in
[
"pId1",
"pId2"
]
when I am trying to use $.participants[?(@.purpose=="agent")].id[0] or similar expressions, no luck in that
Hi Zubair, Thanks for your response. could you help me with an example to understand.
I am trying to extract script attributes set by agent and update those attributes data in wrapup notes.
I am using /api/v2/conversations/emails/${input.conversationId} -- to fetch last agent pid and attributes, and using /api/v2/conversations/emails/${input.conversationId}/participants/${input.participantId} to update wrapup notes