Add an Agent/Score pair variable
Agent scores allow you to specify the priority of preferred agents. If for example, you have agents that you prefer most, set their scores higher, and set backup agents lower. If you don’t have a preference, set the score to 100.
In Architect, to influence routing you can create an agent score pair collection that supports up to 20 agent/score pairs.
To create an individual agent score pair value, use the MakeAgentScorePair function. For example, the following expression in a Transfer to ACD action’s Preferred Agent setting creates an agent score pair collection with two agent score pairs. The first user has a score of 100 and the second has a score of 90:
MakeList( MakeAgentScorePair( FindUserById("<put_user_guid_string_here>"), 100 ), MakeAgentScorePair( FindUserById("<put_user2_guid_string_here>"), 90 ) )
You can use a MakeListAgentScorePair function that takes a collection of users along with an integer collection of scores to associate with the users. Following that method, this example generates the same value as the previous expression:
MakeListAgentScorePair( MakeList( FindUserById("<put_user_guid_string_here>"), FindUserById("<put_user2_guid_string_here>") ), MakeList( 100, 90 ) )
To find the user ID of a user, see Edit a user’s profile.
You can also use an Update Data action to assign variables. Then, use those variables to supply individual user values or user collections, an individual integer score or integer collections, and agent score pairs or collections. For more information about the MakeAgentScorePair, MakeListAgentScorePair, MakeList, FindUserById, and other functions, see Architect’s Expression Help feature. Each function provides more details and examples.
Add an agent/score pair variable to a task sequence
In a task sequence, you can add an agent/score pair variable to an Update Data action.
- From the Toolbox, expand the Data category and drag an Update Data action to the desired location in the task.
- In the Update Data workspace, add a meaningful name to describe the item.
- Click the Add update statement button and select AgentScorePair.
- In the Variable Name field, type the label to identify the variable on tasks.
- In the Value To Assign field, do one of the following:
- To set the value using an expression add the expression inline.
- To set the value using the Agent Score Pair builder, perform these steps:
- Click the Expression button to open the Agent Score Pair builder.
- Click AgentScorePair.
- Under User, enter the agent. Note: If you select a literal user, system uses the FindUserById function with the user’s id at runtime. If the system does not find the user, it returns a NOT_SET AgentScorePair value.
- Under Score, enter the numerical score.
- (Optional) To add another variable, click the Add update statement button.