Original Message:
Sent: 11-15-2024 11:57
From: Samuel Jillard
Subject: Last agent lookup
oooh, they are always tough ones. Thanks for letting me know :D
------------------------------
Sam Jillard
Online Community Manager/Moderator
Genesys - Employees
Original Message:
Sent: 11-15-2024 11:49
From: Varun Chauhan
Subject: Last agent lookup
Hi Samuel,
The code was essentially the same, but there was a minor error in one of the lines. A couple of characters that should have been in lowercase were written in uppercase. Addressing this mistake resolved the issue.
Thank you,
Varun
------------------------------
Varun Chauhan
na
Original Message:
Sent: 10-21-2024 08:18
From: Samuel Jillard
Subject: Last agent lookup
Hi Varun,
Glad you got the issue resolved. Do you mind sharing the fix, it might help another community member in the future?
------------------------------
Sam Jillard
Online Community Manager/Moderator
Genesys - Employees
Original Message:
Sent: 10-18-2024 09:11
From: Varun Chauhan
Subject: Last agent lookup
Thank you, everyone. I was able to resolve the error I was encountering.
------------------------------
Varun Chauhan
na
Original Message:
Sent: 10-17-2024 04:49
From: Varun Chauhan
Subject: Last agent lookup
Hi Andy,
Based on this response, I am receiving the raw data in JSON format. However, I am not getting any data in the input. I come as blank.
Is this something I need to query in the Architect flow?
Thank You,
------------------------------
Varun Chauhan
Original Message:
Sent: 10-16-2024 12:21
From: Andy Jackson
Subject: Last agent lookup
Ah ha..That works when the agent hasn't transferred it, that's where I am getting stuck, that gets the last conversation, but I need to return the last agent in the array
This is my JSON
{
"translationMap": {
"userId": "$.conversations[-1].participants[?(@.purpose == 'agent')].userId",
"conversationId": "$.conversations[?('agent' in @.participants[*].purpose)].conversationId"
},
"translationMapDefaults": {
"userId": "[\"Not Found\"]",
"conversationId": "[\"Not Found\"]"
},
"successTemplate": "{\n\t\"userId\": ${userId},\n \n\t\"conversationId\": ${conversationId}\n}"
}
------------------------------
Andy Jackson
Senior Unified Communications Engineer
Original Message:
Sent: 10-14-2024 17:20
From: Anton Vroon
Subject: Last agent lookup
Hi Andy, If you want the last item in an array, then in your translation map if you have the path $.conversation[] for example if you just add -1 to the index, eg $.conversation[-1] this will retrieve the last item in the array. Doesn't work with tools like Jsonpath when validating though.
------------------------------
Anton Vroon
Original Message:
Sent: 10-14-2024 11:27
From: Andy Jackson
Subject: Last agent lookup
Hi
As a JSON
{
"title": "List of last userIds / conversationIds ordered conversationStart desc",
"type": "object",
"properties": {
"userId": {
"description": "String array of userIds",
"type": "array",
"items": {
"type": "string"
}
},
"conversationId": {
"description": "String array of conversationIds",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": true
}
or

The only trouble I have with it is if the call was transferred it causes an error as there are 2 agents in the conversation. I havent worked out how to return just the last
------------------------------
Andy Jackson
Senior Unified Communications Engineer
Original Message:
Sent: 10-08-2024 12:07
From: Varun Chauhan
Subject: Last agent lookup
Hi Andy,
Could you please tell us what you put in the response part of the body?
Thank you,
Varun
------------------------------
Varun Chauhan
IP Integration Limited
Original Message:
Sent: 09-25-2024 06:48
From: Andy Jackson
Subject: Last agent lookup
Nothing overly fancy, there is a bit of work in the flow to get "now" - 30 days to get the dates

------------------------------
Andy Jackson
Ten Lifestyle Management Limited
Original Message:
Sent: 09-25-2024 06:30
From: Varun Chauhan
Subject: Last agent lookup
Hi Andy,
Can you please tell us which API did you use to search the ANI?
Thank you,
Varun
------------------------------
Varun Chauhan
IP Integration Limited
Original Message:
Sent: 02-22-2023 08:58
From: Andy Jackson
Subject: Last agent lookup
Hi everyone, I wonder if someone can help
I have implemented a data action that gets the last agent that took a call from an ANI (last 30 days) and adds the agent GUID returned as the preferred agent. This works perfectly and as I want it to, but I have a situation where the last agent might have been moved away from that team and no longer has the skill and should not handle that call, but of course it will still route to them.
I have a data action that gets a list of skills for an agent, but how do I check that the agent has the skill in the flow or a data action. I don't seem to be able to tie that part together or I cant get it in my head how to query them.
Any help would be appreciated
Andy
#Routing(ACD/IVR)
------------------------------
Andy Jackson
Ten Lifestyle Management Limited
------------------------------