Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: Dimitry on June 01, 2017, 12:58:44 PM

Title: Get the Skill name using Platform SDK
Post by: Dimitry on June 01, 2017, 12:58:44 PM
Hi,

I am using the platform SDK to retrieve the configuration information . I am able to apply the filter for a particular used and able to retrieve the ConfObjectCollection.  The SkillDBID of the agent is show in the response.

Now I want to pass the SkillDBID as an input and get the Skill name.

How could I do that ??  Any help please.
Title: Re: Get the Skill name using Platform SDK
Post by: PeteHoyle on June 01, 2017, 01:49:29 PM
Try using the Config Object Model (COM) Application block it will do all the hard work for you..


[code]CfgPersonQuery query= new CfgPersonQuery();
        query.UserName = "Pete";
        query.TenantDbid = 1;
        CfgPerson person = confService.RetrieveObject<CfgPerson>(query);

        foreach (CfgSkillLevel level in person.AgentInfo.SkillLevels)
        {
            if (level.Skill.Name == "CustomerService")
            {
            .......[/code]
Title: Re: Get the Skill name using Platform SDK
Post by: Dimitry on June 06, 2017, 05:33:10 AM
Thanks Pete

I tried the same in Java.

CfgPersonQuery query= new CfgPersonQuery();
query.setUserName("XXXXX");
        CfgPerson person = confService.retrieveObject(query);

It still returns me Skill DBID and not skill name. 
Title: Re: Get the Skill name using Platform SDK
Post by: PeteHoyle on June 06, 2017, 07:35:47 AM
You can get the skillname using the code below:

[code]                CfgAgentInfo agentInfo = person.getAgentInfo();
if (null != agentInfo) {
Collection<CfgSkillLevel> skills = agentInfo.getSkillLevels();
if (null != skills) {
for (CfgSkillLevel skill : skills) {
log.debug(skill.getSkill().getName() + " : " + skill.getLevel());
}
}
}[/code]