Revision as of 19:51, July 10, 2017 by Bonniem (talk | contribs) (Run Function)
Jump to: navigation, search

Run Function

Starting with release 8.1.400.??, IRD's Selection object adds the run function to the list of threshold functions available in the General tab. Like the other threshold functions, the run function is useful for conditional routing involving complex strategy logic that cannot be represented with single expression, eliminating the need to configure complex “looping” in strategies.

Use of Threshold Script

The run function extends skill and threshold expressions with external logic by allowing you to specify a threshold script (such as a subroutine) in addition to the regular threshold expression.

String run(subroutine, param1, param2) executes the skill/threshold expression logic packed in the provided subroutine and returns a value. For example, a threshold expression such as run[SomeSubroutine, Target, ExtraData] returns 1 (meaning it is Ok to route) if SomeSubroutine applied to provided data returns 1. If the subroutine returns 0 then entire threshold expression also returns 0 (routing is not allowed). The run function allows execution of any logic from a skill/threshold expression – the logic just needs to be packed into the threshold script.

Run Function Samples

Below is a sample of threshold expression using the run function:

sdata[ITC_COE_Disputes_MAS_ANY_VAG@.GA,StatAgentsTotal] < 1 & run[Sub_OpenHoursCheck,ITC_COE_OpenHours,ITC_COE_OpenHoursPlansList] >"0"


In this example, The run subroutine gets as input the name of a List object (ITC_COE_OpenHours), the name of the section within the List object (ITC_COE_OpenHoursPlansList)

  - get from this section information about today's open hours and check current time – is it or not within open hours boundaries.

Sample of skill expression might be: run[IsAgentScoreGood, CallerID, ExtraData] > "0". It is assumed that subroutine IsAgentScoreGood will return is specific agent good or bad for caller. Subroutine must have 4 input parameters and when called

   param1 will be agent name, param2 - name of VQ if known, param3=CallerID, param4= ExtraData. 

URS will apply this subroutine to every agent and only those for whom subroutine return not 0 vale will be considered as valid targets.


There are following rules/limitations while working with function run.


Tip
Prior to ORS 8.1.400.61, the run function was previously undocumented. This function is in addition to the existing threshold functions.

Existing Threshold Expressions

Threshold Expressions and Skill Expressions

You can use the following functions in threshold expressions (all lowercase):

[+] sdata



[+] acfgdata



[+] callage



[+] lcfgdata



Comments or questions about this documentation? Contact us for support!