Deploying the URS Strategy Subroutines
Genesys Predictive Routing (GPR) provides subroutines components that are integrated with your Genesys Routing solution. The subroutines are placed within an existing strategy, where they add agent scoring and best-match functionality that enables you to fine-tune the routing of a specific interaction to the agent who can best handle it, based on the KPIs you want to optimize.
This topic explains how to use the pre-configured strategy subroutines for use with Interaction Routing Designer (IRD) and Universal Routing Server (URS). This topic includes the following information:
- List of subroutines and other files included in the IP, with brief explanations of what they do.
- Deployment procedures.
- An explanation of how the subroutines operate.
For the Composer Subroutines deployment, see Composer, Orchestration Server (ORS), and URS.
- If you would like to evaluate Genesys Predictive Routing for use with schedule-based routing (using Genesys Workforce Management), service-level routing, or business-objective routing, contact Genesys Professional Services for a review of your routing environment.
- For descriptions of how the subroutines handle agent-surplus and interaction-surplus scenarios, see Interaction Flows.
Out-of-the-Box IRD/URS Strategy Subroutines
The IP for the URS Strategy Subroutines component contains the following strategy subroutine RBN files as well as the object.kvlt file and the Predictive_Route_Data_Template.cfg file. (The RBN files are listed in alphabetical, not logical, order.)
- ActivatePredictiveRouting_v<version_number>: Called from a routing strategy when the conditions you specify are met. This subroutine automatically calls additional subroutines that handle scoring, ranking of scored agents, and evaluation as to whether there is an agent available to handle the interaction based on agent score. Referred to simply as ActivatePredictiveRouting in the remainder of this topic.
- GetActionFilters: Called from the ActivatePredictiveRouting subroutine to parse the Virtual Agent Group string representation.
- GetScoringAuthToken: Called from the ActivatePredictiveRouting subroutine to authenticate with the AI Core Services REST API.
- GPRIxnCompleted: Attaches Predictive Routing-specific keys to interaction user data. The attached data includes the details required for predictive routing performance analysis. Links to the interaction ID in Genesys Info Mart. (Named PRRIxnCompleted in earlier releases.)
- isAgentScoreGood: URS calls this subroutine to suppress routing to an agent who is in ready state if this agent does not provide an acceptable match for the interaction.
- ScoreIdealAgent: Called by URS before routing an interaction to an Agent Group or Virtual Agent Group at the time URS invokes the SelectDN function. This subroutine sorts the agents within the target group according to their scores, in decreasing order. It can also rescale the agent score to the range accepted by URS, if necessary.
- ScoreIdealAgentDefault: Used either when the agent scores for the current interaction are unknown or when running GPR in dry-run mode.
- SetIdealAndReadyCondition: Called from ActivatePredictiveRouting subroutine. This is a wrapper subroutine around scheduling the calls to subroutines such as ScoreIdealAgent and isAgentScoreGood, which are executed outside the main interaction processing flow. Implements the GPR operation modes controlled by the prr-mode option.
- SetIdealAndReadyConditionforOCS: Required if you are using the Composer Workflow Subroutines.
- objects.kvlt: A text file containing objects required by the strategy subroutines. You must import this file as well as the RBN file for the strategy subroutines to work correctly.
- Predictive_Route_Data_Template.cfg: Template for the Predictive_Route_DataCfg Transaction List object. Stores GPR-related configuration options and values.
Installing the URS Strategy Subroutines
The following is a high-level overview of the steps required to deploy the URS Strategy Subroutines:
- Configuring URS to Support Predictive Routing.
- Import the subroutines. For a lists of the subroutines, with descriptions of their functionality, see IRD/URS Strategy Subroutines.
- Define the entry points in your IRD strategy for the appropriate subroutines.
- Set appropriate values for the strategy subroutine configuration options, located in the Predictive_Route_CfgData Transaction List object.
- Configure the parameters for the subroutines used in your environment.
- Test that the subroutines are correcting directing interactions to agents.
The following sections provide detailed instructions for setting up your subroutines.
Configuring URS to Support Genesys Predictive Routing
Perform the following steps to configure URS to work with GPR:
- Create the static_strategy configuration option in the [default] section of the URS Application object and set its value to empty. You can set this option either on the level of individual routing points or on the tenant/URS level. Depending on where you set it, the option works slightly differently. This option takes effect immediately and does not require that you restart URS.
- Configure the http log for URS to check scoring requests and responses. To do this, set the verbose option in the [web] section to 3.
- Set the run_verbose option in the [default] section to 0.
- Set the vqtime option in the [default] section to 13:2048.
Strategy Subroutine Integration for URS/IRD
To use the strategy subroutines provided with Predictive Routing, perform the following steps:
- Navigate to the Export/Import Bar in IRD and import the strategy subroutines from the URS Strategy Subroutines IP.
- For instructions, see the Export/Import Bar topic in the Interaction Routing Designer Help, which you can open from the Universal Routing landing page.
- Open the strategy you plan to use with Predictive Routing and place the ActivatePredictiveRouting Call Subroutine object in the desired location. It must be inserted into the routing strategy before the call to a Routing block or a call to the SelectDN (or SuspendDN) function. The graphic below shows the subroutine insertion points.
- This subroutine requires the following three input parameters:
- skill_target: Has the type STRING. Contains a string representation of the target selected by the URS for an interaction. This must be a virtual agent group.
- skill_data: Has the type LIST. It must contain the following two keys:
- overflow_timeout: A STRING defining a period of time in seconds during which URS tries to route the interaction to the current target.
- base_priority: An INTEGER defining the priority value the interaction has before the call to the ActivatePredictiveRouting subroutine.
- default_skill_data: Has the type LIST. It must contain the following keys:
- AgentScore: Takes either Y or N as its value. To activate predictive routing, you must set this parameter to Y.
- predictor: Contains the name of the section in the Predictive_Route_DataCfg Transactions List configuration object that defines predictor configuration.
- prr-ixn-timestamp: Contains a value defining the number of seconds since midnight when the interaction was queued.
- The GPRIxnCompleted subroutine (called PrrIxnCompleted in earlier releases) can be inserted either as a Custom Routing step in the Routing object or immediately in front of the object in your strategy that contains a call to the RouteCall function.
- In releases prior to 9.0.007.00, insert the PrrIxnCleanup subroutine after the green port exit from either the Routing object or the object that contains a call to the RouteCall function.
- Set values for the configuration options in the Predictive_Route_DataCfg Transaction List Object:
How the Strategy Subroutines Work
- ActivatePredictiveRouting: Agent Scores are stored in the global map based on the connid (original, if consult), and the key of the agentid with the value of agent score.
- SetIdealAndReadyCondition sets the URS callback subroutines for SetIdealAgent to ScoreIdealAgent, and SetReadyCondition (if enabled) to isAgentScoreGood.
- The parameters for these callback subroutines are retrieved and verified before the router request is invoked to enable the callbacks.
- The URS targeting, upon determining a list of candidate targets based on the target expression (Skill, Agent Group, and so on) then executes the callback ScoreIdealAgent.
- When an agent becomes ready, isAgentScoreGood is executed to determine if that target is ok to select.
- ScoreIdealAgent retrieves the score for the given agent from the global map set in Step 1. The connid was defined in the parameters set in the router request to SetIdealAgent callback. The result, RES, is the agent score from the map.
- Leaving aside agent occupancy, the SetIdealAgent subroutine returns the value of configured ‘best’ score – this agent’s score. So if this agent has the best score, SetIdealAgent will have a value of 0, which URS interprets as best.
- The isAgentScoreGood callback, assuming max queue time is not exceeded, and it is not a high priority call, and URS is not in overload, the proceeds to retrieve the score for the given agent from the global map set in Step 1.
- The connid was defined in the parameters set in the router request to SetReadyCondition callback. Next the threshold for the minimum acceptable score is calculated if configured. If the agent’s score exceeds the threshold, a value of ‘1’ is Returned, which causes the agent to be set ready for selection.
Effectively SetIdealandReadyCondition is the end of the subroutines. Everything exits after it tells URS to execute one or two extra strategies once it finds a target agent. Once ActivatePredictiveRouting exits, the target block is executed as normal. SetIdealandReadyCondition has told URS to execute ScoreIdealAgent once it finds a target agent. If thresholds are configured for agents SetReadyCondition function of the URS executes isAgentScore good subroutine to determine if the agent selected has a GPR score good enough for routing to.