Genesys Cloud - Main

 View Only

Sign Up

Expand all | Collapse all

ACD Call Distribution

  Thread closed by the administrator, not accepting new replies.
  • 1.  ACD Call Distribution

    Posted 06-06-2023 09:03
    No replies, thread closed.

    Dear Team, I have a requirement from client as below. we have 2 queues and need to distribute the calls between 50,50 among them,

     Please let me know the availability options to fit these requirement.


    #Routing(ACD/IVR)

    ------------------------------
    Raghavapvds
    ------------------------------


  • 2.  RE: ACD Call Distribution

    Posted 06-06-2023 09:30
    No replies, thread closed.

    Easiest thing to do would be to create a variable using the randomint function, and then check that value to route on it. For example, if the variable is called "random" and is a number between 1 and 100, you could then check it to see if it's below 50. If it is, use one queue, if it's not, use the other. 



    ------------------------------
    Dean Thames
    Sr. Principal Consultant Cloud CX
    ------------------------------



  • 3.  RE: ACD Call Distribution

    Posted 06-07-2023 04:49
    No replies, thread closed.

    Dean,

    Thanks for your support.

    I was created the tasks as above but it majority of the calls going to "No side" in decision.

    Like we made 9 calls 7 calls went to "NO" side and 2 calls went to "Yes" side,please let me know the reason for this behaviour.

    I was not clear how it this logic was working? could you please explain me .



    ------------------------------
    Raghavapvds
    ------------------------------



  • 4.  RE: ACD Call Distribution

    Posted 06-07-2023 04:56
    No replies, thread closed.

    Long term it should even out as it's random. 10 calls is a small sample size - basically what is happening is the flow is generating a number from 0-100 and then seeing if that is above or below 50. Like roulette, over time it will be red or black etc. 

    While my solution is more complex, it would give you totally even spread of calls. Just depends on your particular use case



    ------------------------------
    Lawrence Drayton
    Prvidr Pty Ltd
    ------------------------------



  • 5.  RE: ACD Call Distribution

    Posted 06-06-2023 18:09
    No replies, thread closed.

    I've had this from a client before and had the need for it to be 100% equal and were not wanting to leave it to randomness (Though I agree with Dean that his solution works and is the easiest) 

    In my case I had to get a bit complex and have a data table with a key of "call" and then an integer assigned to it. eg 1. Then a data table look up to see what the current value was, a decision based on odd or even number that would take path a or b, and then a data action to increase that integer by 1. When the call was odd it went path a, even path b. 

    Even this is not 100% (but was 99.9% lol) in the case you got a call that came through at almost exactly the same time when the processing hadn't been completed. Depending on your clients I would go with Deans solution but if they were as stringent as mine I would be happy to help/share my old flow for that 



    ------------------------------
    Lawrence Drayton
    Prvidr Pty Ltd
    ------------------------------



  • 6.  RE: ACD Call Distribution

    Posted 06-07-2023 05:49
    No replies, thread closed.

    Lawrence Drayton

    Could you please share your flow for our reference



    ------------------------------
    Raghavapvds
    ------------------------------



  • 7.  RE: ACD Call Distribution
    Best Answer

    Posted 06-07-2023 06:34
    No replies, thread closed.

    Sure thing - 

    Just note that this is an overly complex way to achieve this. You will need the following 

    • Data table set up with a key (as you can have multiple paths) I used a digit for the key, and then a field set as an integer
    • Data action - this data action should hit 

      /api/v2/flows/datatables/{datatableId}/rows/{rowId}

    • This Data table should then have a payload to reset the key to it's default value of 1
    • Common module flow (as attached)

    You can see the call would come in, do a data table lookup. The default value is 1 and as it's found it runs through a decision block (You can use a switch if you've got more than two routes). IF value = 1 then it updates the original value to +1 and then runs a data action to update the value to 2. Then updates data (which outputs from the flow so you can use this in another decision block in the main flow as to where to send the call) If the value is 2 in the beginning, it changes the callNumber value through a data action to 1 (for the next call) and then sends it out with the 2 for the decision block in the main flow. 

    Honestly, it's confusing even typing this out but I hope that makes sense. It's an overly complex way of achieving the same thing you want and could do with @Tatjana Knezevic  and @Dean Thames solutions. My difference is a client that had financial implications to make sure calls were evenly split to BPOs

    Let me know if you have any questions 



    ------------------------------
    Lawrence Drayton
    Prvidr Pty Ltd
    ------------------------------



  • 8.  RE: ACD Call Distribution

    Posted 06-07-2023 06:42
    No replies, thread closed.

    ah... that's probably easier than doing math and a contains function!



    ------------------------------
    Dean Thames
    Sr. Principal Consultant Cloud CX
    ------------------------------



  • 9.  RE: ACD Call Distribution

    Posted 06-09-2023 05:54
    No replies, thread closed.

    Hi Lawrence

    Thanks for your support and solution is working.



    ------------------------------
    Raghavapvds
    ------------------------------



  • 10.  RE: ACD Call Distribution

    Posted 06-07-2023 06:40
    No replies, thread closed.

    Raghavapvds, the solution noted by Lawrence would require a data table, a function in your flow to reference the data table, and then a data action to increment the value of the data table row on a per call basis. 

    So, if the data table row had headers of index & integer, it may have values of call & 1 at the start

    In your flow, you would check that data table for an index of "call" and then return a value of 1 into a variable  you could then work with... say "flow.callcount" You could then perform a math function on that value to determine if it's even or odd.... basically by dividing it by two (flow.callcount/2) and putting that result into another variable (flow.callcountEvenOrOdd) and seeing if it has a decimal place. There are several ways to do this, but running a "contains" function on that result as a string would work: Contains(ToString(Flow.callcountEvenOrOdd), ".") The result of that would be a boolean true/false value you could route against. 

    After that, you would use a data action to increment the integer value in your data table by one. The process would repeat for each call. 



    ------------------------------
    Dean Thames
    Sr. Principal Consultant Cloud CX
    ------------------------------



  • 11.  RE: ACD Call Distribution

    Posted 06-07-2023 17:48
    Edited by Anton Vroon 06-07-2023 17:48
    No replies, thread closed.

    An easier way to get odd/even is just % 2 (mod 2) if the result is 0 then even otherwise it is odd.

    Eg Flow.callcount %2 == 0

    Would be true if even, and false if odd.



    ------------------------------
    Anton Vroon
    ------------------------------



  • 12.  RE: ACD Call Distribution

    Posted 06-07-2023 18:59
    No replies, thread closed.

    Actual math! Nice. 



    ------------------------------
    Dean Thames
    Sr. Principal Consultant Cloud CX
    ------------------------------



  • 13.  RE: ACD Call Distribution

    Posted 06-06-2023 20:15
    No replies, thread closed.

    @Raghavapvds pvds 

    We use a similar approach as Dean's. The difference is that instead of a random number we use the current timestamps (milliseconds portion) ToInt(Left(Right(ToString(GetCurrentDateTimeUtc()),3),2)) 



    ------------------------------
    Tatjana Knezevic

    www.startelecom.cloud

    https://www.linkedin.com/company/star-telecom-www-startelecom-ca-/
    ------------------------------



  • 14.  RE: ACD Call Distribution

    Posted 06-07-2023 06:18
    No replies, thread closed.

    Yep, timestamps can work too... 



    ------------------------------
    Dean Thames
    Sr. Principal Consultant Cloud CX
    ------------------------------



  • 15.  RE: ACD Call Distribution

    Posted 06-07-2023 22:31
    No replies, thread closed.

    Just wanted to add

    You have 3 options the way I see it.

    Option 1, As Dean mentioned do a randimInt(1) to get either a 0 or a 1, or any other 50/50 range, and just randomise it. This does have the issue others have noted that if you flip a coin 1000 times you should expect 500 tails and 500 heads but there will be stretches where you get 10 tails in a row for example.

    Option 2, DataTable as mentioned. You could either do a number count like those listed, adding up, or replacing a 0 and 1, Or just a boolean flag to mark who's turn it is, if True set to False in the flow, if false set to True, or just not the current value ie !flow.Bool, and if true then go to queue 1 if false go to queue 2, but you will have some cases where calls are being processed at the same time.

    Option 3, is using a DataAction to call the analytics API to see the calls offered/answered/waiting for both queues and if the value is larger then send to the other queue. This will tend to ensure fairer amount, you still have calls being processed at the same time, but this will even out over the longer run, since if 2 calls processed in Queue 1 at the same time, the next 2 times this check is done it will still send those calls to other queue. 



    ------------------------------
    Anton Vroon
    ------------------------------



  • 16.  RE: ACD Call Distribution

    Posted 06-09-2023 13:01
    No replies, thread closed.

    I like using time or call count.

    The problem with data tables is that it isn't scalable. If you get to high levels of calls, you start hitting the Rate Limit. Data Tables are not really meant to be written to from Flows (which is why there isn't an operation to do it!) not are they intended to be used as a form of "Global" variable. Even if you don't hit the Rate Limits, you will doubtless experience race conditions where multiple calls are trying to update the table in quick succession. (So you may have a current value which has been read by multiple flow instances before the first instance is able to write the new value back.)

    Just my 10 cents.



    ------------------------------
    Paul Simpson
    Eventus Solutions Group
    ------------------------------