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.
- If the action encounters an agent score pair collection supplied with more than 20 items, call flows take the Failure output at runtime. If you bind a variable to the
errorType
failure output, the value contains the “TooManyPreferredAgents” string value. In email, chat, and message flows, Architect implements flow error handling. - The
MakeListAgentScorePair
function does not support the NOT_SET value. If a user is removed from the system or no longer exists, and you do not update the preferred agent routing list, theFindUserById
function returns the NOT_SET value. In this scenario, theMakeListAgentScorePair
function fails and the entire flow follows error handling.
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 next to Update Statements and select the AgentScorePair data type.
- 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 large expression editor, click to open the Edit Expression Editor and build your expression.
- To set the value using the Agent Score Pair builder, perform these steps:
- Click the Expression modes button to open the Agent Score Pair builder.
- Select AgentScorePair Builder.
- To use the MakeAgentScorePair Architect function to set the value, click AgentScorePair and click Make 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 next to Update Statements.