Legacy Dev Forum Posts

 View Only

Sign Up

Is there a way to query routing skills by name?

  • 1.  Is there a way to query routing skills by name?

    Posted 06-05-2025 18:14

    mk_telephony | 2018-09-21 05:07:35 UTC | #1

    I see that there is an API to be able to get a specific routing skill by ID, or get all routing skills.

    Is there a way to query existing skills by name? The usecase is that I want to be able to look up whether a skill already exists before trying to create it.

    Presently, if a new skill is created, say with the name "testing", if I try to create it again it returns a 409, so skills with the same name are avoided, however is there a way to avoid attempting to create every time?

    Also, if the skill name is known, I want to be able to get the skill ID so I can add that skill to a particular user, which requires the skill ID not name

    What is the recommended approach here? If there is a way to query skills, a sample query would be appreciated.

    One approach is to fetch the list of all routing skills every time, but that is incredibly inefficient, so want to avoid this.

    Thanks


    anon28066628 | 2018-09-21 14:02:37 UTC | #2

    Hi mk,

    You're thinking about the right things. This is the resource to get the list of skills:

    https://developer.mypurecloud.com/api/rest/v2/routing/index.html#getRoutingSkills

    You can get up to 100 at at time. Pulling this list each time might not be a bad approach, depending on the frequency of your calls and number of skills (less than 100?). Otherwise, you could cache the results and get the skills list only periodically. This requires that you store the list locally either persistently (db or file) or at least in memory, which requires a continuously running process. The caching approach depends on the storage options of the environment you're working with - if it's a stateless trigger-based system, for example, it might be tougher.


    mk_telephony | 2018-09-21 20:01:51 UTC | #3

    Hmm it looks like there is a name attribute that can be passed to that endpoint that does in fact allow querying by the name. That should work.


    system | 2018-10-22 20:01:53 UTC | #4

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 3600