Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

Evenly distribute calls between numbers?

(UCCX 8.5.1)

I'm trying to find a way to evenly distribute calls between multiple offices. 

Example:

Call comes into the main number, checks Holiday/ToD then sends the call to the first number, sends the second call to the second number and repeats until the last number has been given a call.  After the last number, the script sends call the next call to first number and so on. 

Is there a way to count the calls and have the count direct the call and then reset after the last number has been reached?

Everyone's tags (5)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Evenly distribute calls between numbers?

I couldn't help myself.  I started thinking about psuedo random numbers, and I just got caught up in the moment.

Here's an exmple of how well the Java Random class will randomly select one of three numbers over a sample size of 1,000.

uccx-random.png

Note that 0's were selected 33.4%, 1's were selected 34.6%, and 2's were selected 32.0%.  That's a pretty even distribution, for the tiny amount of effort in coding to get this to work.  Example below:

Variables

String[] transfer_numbers = new String[] {"1000", "2000", "3000"}

java.util.Random rand = new java.util.Random()

Script

...

Call Redirect (--Triggering Contact--, transfer_numbers[rand.nextInt(3)])

  Successful

    End

...

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
5 REPLIES

Evenly distribute calls between numbers?

The easiest method is not the most accurate method: random numbers.

Say for example you flipped a coin, it will land on heads 50% of the time and tails 50% of the time.  Kind of.

So if you wanted an even distribution between two numbers, you could randomly flip a virtual coin, and then send the call to the "heads" number or the "tails" number.  And this will get you in the neighborhood of a 50/50 split.

Take that idea to a 3 sided coin...err...let's drop the coin analogy for now, and just say three possible numbers: 1, 2, 3.  Then randomly pick one.  Well, statistically, you would pick each number about 33% of the time.  Almost.

If that doesn't work for you and you need an actual circular routing algorithm, then you will need to cache the last number used, so that you can increment by 1, and move to the next number.

Without using files and or databases to do this, you could use a Global Session Object to store this cached information.  Each and every call in the system can read/write to this Global Session Object, you just have to worry about race conditions, but honestly, since UCCX is not multithreaded, the chances of that happening are very slim, and the worst that can happen is you skip a number once out of every million calls.  Ok, I made those numbers up, but I think my point is still valid. 

Search for some of my posts on working with Sessions, then Global Sessions, and see if you can get something put together to get you started.

If you want to go the file or database route I can help there too.

Let me know how you want to proceed.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
New Member

Evenly distribute calls between numbers?

Thanks Anthony.  I'll do some reading as you suggested and see what I can come up with.  If I'm still struggling, I'll let you know.

I appreciate the help!

Re: Evenly distribute calls between numbers?

I couldn't help myself.  I started thinking about psuedo random numbers, and I just got caught up in the moment.

Here's an exmple of how well the Java Random class will randomly select one of three numbers over a sample size of 1,000.

uccx-random.png

Note that 0's were selected 33.4%, 1's were selected 34.6%, and 2's were selected 32.0%.  That's a pretty even distribution, for the tiny amount of effort in coding to get this to work.  Example below:

Variables

String[] transfer_numbers = new String[] {"1000", "2000", "3000"}

java.util.Random rand = new java.util.Random()

Script

...

Call Redirect (--Triggering Contact--, transfer_numbers[rand.nextInt(3)])

  Successful

    End

...

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
New Member

Evenly distribute calls between numbers?

I appreciate your enthusiasm!

Your scripting/programming knowledge is light-years ahead of mine.  While working on a call center script in ICM, I remembered the "% allocation" node and set up a test script.  The call distribution is working well.

Thank you for all your help and for the great examples!

Re: Evenly distribute calls between numbers?

Ha!  I'm surprised you can even pick up on my enthusiasm, considering my writting skills are lacking.  I'm no english major.

If you ask anyone who has ever met me in person, they will tell you that I am infinitely passionate about UCCX.  I love this product.  I'm not saying it's perfect, but it's pretty darn cool.  Much better than boring old CUPS, that's for sure.

I just hope no CUPS engineers see this post.  I'll claim someone hacked my CCO account and wrote that pretending to be me to tarnish my reputation. 

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
810
Views
5
Helpful
5
Replies
CreatePlease to create content