Author Topic: Percentage Based Routing IRD/URS  (Read 369 times)

Offline PFCCWA

  • Hero Member
  • *****
  • Posts: 572
  • Karma: -7
Percentage Based Routing IRD/URS
« on: March 20, 2019, 01:15:23 AM »
Hello,

I am developing a routing strategy to apply a percentage rule using a Transaction List.
In summary this the flow:
Router perform crm db check on caller and extract id (var_id ie NEW).
Router checks transaction list (customer_id) and section=var_id extracting value ie 60,20,20.
Router assigns each value to an integer ie var_site_a=60, var_site_b=20, var_site_c=20.

i want to use values to route the call as a percentage across 3 route points or ACD queues ie
60% to ACD Queue 1000
20% to ACD Queue 2000
20% to ACD Queue 3000

If i use a percentage function block i can define a acd queue but have to specify an integer for percentage (as opposed to using the values obtained from the transaction list) whereas i want to do something like this:
var_site_a (%) to ACD Queue 1000
var_site_b (%) to ACD Queue 2000
var_site_c (%) to ACD Queue 3000

Is there a way to do this?
We are using URS/IRD 8.1

thanks

Offline hsujdik

  • Sr. Member
  • ****
  • Posts: 324
  • Karma: 14
    • Genesys Brasil
Re: Percentage Based Routing IRD/URS
« Reply #1 on: March 20, 2019, 01:17:13 AM »
I usually use the random function for that

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1789
  • Karma: 57
Re: Percentage Based Routing IRD/URS
« Reply #2 on: March 20, 2019, 03:43:47 AM »
Hi,

It is possible to specify weight of each target dynamically if SelectDN function is used, e.g. Weight[60]1000@SwitchName.Q,Weight[20]2000@SwitchName.Q,Weight[20]3000@SwitchName.Q

R.

Offline PFCCWA

  • Hero Member
  • *****
  • Posts: 572
  • Karma: -7
Re: Percentage Based Routing IRD/URS
« Reply #3 on: March 27, 2019, 04:46:13 AM »
Hello,
I have tried the weight in SelectDN but URS is not choosing the target based on the weight.  It always selects the 'Site A' target.
I may be missing something but have changed values to '100' for 'Site B' target but is still never selected.
URS logs show the 'Site B' as 'Passed' but is never selected.
see my function block expression:

Var_Routing=
SelectDN['','','',StatSelectMax,'Weight[Var_SITEA_Pct]1000_SITEA@StatServer_R.Q','Weight[Var_SITEB_Pct]2000_SITEB@StatServer_R.Q']

I think it is using the 'StatSelectMax' to override the weighting but could be wrong.  If I try to remove this it does not accept the expression.
A function block following this is set to RouteCall[Var_Routing].
The Var_* are integer types and are assigned the correct values based on option from the transaction list.

edit* If I replace the variables within the [] with numerical characters ie 100 for site b, and 0 for site a it does work.  For some reason it is not accepting the variables- which is an integer type.

thanks,
« Last Edit: March 27, 2019, 07:29:13 PM by PFCCWA »

Offline terry

  • Sr. Member
  • ****
  • Posts: 274
  • Karma: 32
Re: Percentage Based Routing IRD/URS
« Reply #4 on: March 28, 2019, 03:25:45 AM »
When variables are "hidden" deep inside strings constants - there is very few places when URS parses those constants to find possible variables inside - probably it makes such searching only in skill expressions.
Doesn't work for targets specifications (weight, type of target, etc) values need to be used directly.

If 0 for site A and 100 for site B doesn't work - difficult to say anything without logs.

 

Offline PFCCWA

  • Hero Member
  • *****
  • Posts: 572
  • Karma: -7
Re: Percentage Based Routing IRD/URS
« Reply #5 on: March 28, 2019, 07:58:12 AM »
I usually use the random function for that


Please can I ask how this would work?
The 'Rand' function will produce a value based on a integer between 1 and the interval period which I understand.
Do I then use another function to pick the highest output value and routecall to it?

my thoughts are:
var_site_a=rand(var_site_a_pct) = 46
var_site_b=rand(var_site_b_pct) = 13
var_site_b=rand(var_site_c_pct) = 26

a function block to select the largest value (how do i do this?)

RouteCall function block to (biggest value from previous block)ACD queue.

thanks

Offline hsujdik

  • Sr. Member
  • ****
  • Posts: 324
  • Karma: 14
    • Genesys Brasil
Re: Percentage Based Routing IRD/URS
« Reply #6 on: March 28, 2019, 08:56:11 AM »
I usually use the random function for that


Please can I ask how this would work?
The 'Rand' function will produce a value based on a integer between 1 and the interval period which I understand.
Do I then use another function to pick the highest output value and routecall to it?

my thoughts are:
var_site_a=rand(var_site_a_pct) = 46
var_site_b=rand(var_site_b_pct) = 13
var_site_b=rand(var_site_c_pct) = 26

a function block to select the largest value (how do i do this?)

RouteCall function block to (biggest value from previous block)ACD queue.

thanks


I sum them up. Like:

D = rand(A + B + C)
If D <= A then “target A”
Else D = D - A
If D <= B then “target B”
Else “target C”

Of course this works better using a KVList and making a loop out of it testing the values