" /> Get the Skill name using Platform SDK - Genesys CTI User Forum

Author Topic: Get the Skill name using Platform SDK  (Read 2054 times)

Offline Dimitry

  • Newbie
  • *
  • Posts: 41
  • Karma: -1
Get the Skill name using Platform SDK
« on: June 01, 2017, 12:58:44 PM »
Advertisement
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.

Offline PeteHoyle

  • Full Member
  • ***
  • Posts: 126
  • Karma: 13
Re: Get the Skill name using Platform SDK
« Reply #1 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]

Offline Dimitry

  • Newbie
  • *
  • Posts: 41
  • Karma: -1
Re: Get the Skill name using Platform SDK
« Reply #2 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. 

Offline PeteHoyle

  • Full Member
  • ***
  • Posts: 126
  • Karma: 13
Re: Get the Skill name using Platform SDK
« Reply #3 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]