Genesys CTI User Forum > Genesys-related Development

How to Read all agent of a Agent Grroup (or Group Target)

(1/1)

fabio.meschini:
Hi all,

i'm using the 7.6 psdk api and i need to read on configuration server all information regarding all agent contained into a VAG or GT.

I think that i need to do 2 different requests (RequestReadObject), one for retrieving the VAG (CfgAgentGroup) and the 2nd request for filtering the agent (CfgPerson).
Can anybody suggest me a way for retrieve agents information throught a single request? I'm evaluating also a possibile upgrade of the psdk api.

Thanks a lot,

FABIO

Kubig:
do not know PSDK 7.6 a lot, but within latest PSDK versions you can use CfgQuery and get/filter data at one "place". Try to read doc about it.

kerry.finlayson:
Hi Fabio,

I am using a later version of the psdk but this is how we retrieve the agent username from a particular VAG:

CfgAgentGroupQuery agentGroupQuery = new CfgAgentGroupQuery(_confService);
                agentGroupQuery.Name = vagid;
                CfgAgentGroup agentGroup = _confService.RetrieveObject<CfgAgentGroup>(agentGroupQuery);
                List<string> agentList = new List<string>();
                foreach (var agent in agentGroup.Agents)
                    agentList.Add(agent.UserName);
                return agentList;

Hope that helps,
Kerry.

fabio.meschini:
Thank you so much for your replies.
I've decided to upgrade psdk for using confservice and CfgQueries as you suggest me.
Thank you!
Fabio

Navigation

[0] Message Index

Go to full version