Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: govi on July 28, 2021, 03:22:23 PM

Title: Adding Skill
Post by: govi on July 28, 2021, 03:22:23 PM
trying to add skill by using the below code, im able to add but it's deleting another skill and adding a new skill.
can anyone advise the issue in below code
=====================================================================
CfgSkillLevel skillToADD = null;
            foreach (CfgSkillLevel level in Generic.agent.ConfPerson.AgentInfo.SkillLevels)
            {
              level.Skill.Name = "Internal_routing";
                skillToADD = level;
                break;
            }

            if (skillToADD != null)
            {
                Generic.agent.ConfPerson.AgentInfo.SkillLevels.Add(skillToADD);
                Generic.agent.ConfPerson.Save();

            }
Title: Re: Adding Skill
Post by: cavagnaro on July 28, 2021, 09:10:09 PM
Grab current Skills and add it into that List, then Add that List (your are adding, not appending) and Save