Get the Skill name using Platform SDK

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.

Try using the Config Object Model (COM) Application block it will do all the hard work for you..

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")
            {
             .......

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.

You can get the skillname using the code below:

                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());
				}
			}
		}