Revision as of 15:14, June 27, 2017 by Bonniem (talk | contribs) (Threshold Functions)
Jump to: navigation, search

Threshold Functions

IRD's Selection object, General tab, supports using threshold functions in strategies, which can eliminate the need to configure “looping” in complex strategies. They are useful for conditional routing when a strategy is required to perform many calculations instead of just comparing a few values. .

Threshold Expressions and Skill Expressions

ORS uses both skills expressions and threshold expressions.

  • URS uses skill expressions for target selection for both routing (such as Ideal Agent) and for statistics (such as agent readiness).
  • ORS uses threshold expressions for specifying target/queue thresholds (function SetTargetThreshold, and additional thresholds) in routing objects.

Run Function

Use the run function to extend skills/thresholds expressions with strategy logic via a combination of arithmetic, comparing, logic operators) and external logic written in form of a script (subroutine).

String run(subroutine, param1, param2) – executes provided subroutine and returns whatever value the subroutine returns. This function basically allows to execute from skill/threshold expression "any" logic – just it need to be packed into subroutine. 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.

The run function allows the use of a threshold script (such as a subroutine) in addition to a “threshold expression”. For example, a threshold expression such as run[SomeSubroutine, Target, ExtraData] will return 1 (meaning it is Ok to route) if SomeSubroutine applied to provided data will return 1. If the subroutine returns 0 then entire threshold expression also returns 0 (routing is not allowed)

Existing Threshold 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!