Routing Calls to Preferred Agents with Specified skill

I am trying to set agent score pairs for preferred agent routing and would like to set a score for all agents with a specified skill. We have connected our system to Salesforce and pull some data from there. One field we pull is "Region" which is a picklist containing US State abbreviations. We then created matching skills in Genesys for each US State. In the flow, we set the variable SalesforceRegion = flow.region .
I am trying to do something along the lines of:

MakeList(
MakeAgentScorePair(
FindUserById(Flow.CaseOwner.id),
100
),
MakeAgentScorePair(
All users with skill "flow.region"
90
)
)

If there is a way to write this formula, please advise. There is no information in the PureCloud Resource Center concerning setting preferred agents based on skill.

1 Like

Architect does not have an expression that lets you find users by a skill. Write a purecloud data action to get the users with that skill. Use the /api/v2/users/search endpoint, the request body will look similar to this
{
"query": [{
"fields": ["routingSkills.name"],
"value": "insertSkillNameHere",
"operator": "AND",
"type": "EXACT"
}]
}

Create a collection variable of agent score pairs and add the case owner & score. Loop through the results of the data action and add each user (using the FindUserById expression) & score to the collection variable using the AddItem expression

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