Revision as of 20:35, July 10, 2017 by Bonniem (talk | contribs) (Run Function Samples)
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, which can eliminate 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 threshold expression using the run function:

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)
  • Gets from this section information about today's open hours and checks the current time – is it or not within open hours boundaries?

Below is a sample of skill expression using the run function. It is assumed that subroutine IsAgentScoreGood will return whether a specific agent is good or bad for caller.

run[IsAgentScoreGood, CallerID, ExtraData] > "0".



The 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. URS will consider as valid targets only those for whom the subroutine returns a non 0 value.

Limitations

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

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!