Genesys Cloud - Main

 View Only
Discussion Thread View
Expand all | Collapse all

Route a call percentage ?

  • 1.  Route a call percentage ?

    Posted 04-03-2020 04:58
    Hi, 

    I was wondering if it was possible on Genesys to route a call percentage?

    To give an example:
    I have 3 separate call centers (which we will name A, B and C) which are connected to the same queue.
    How to route 20% on the A, 55% on the B and 25 on the C queue?
    
    I had thought of making from Architect a call of a random number between 1 and 100 to route the call according to this number.
    But I was wondering if there were not other more reliable and rather easy means to realize.

    Thanks in advance,
    Alexandre
    #Routing(ACD/IVR)

    ------------------------------
    Alexandre Brenne
    Niji SA
    ------------------------------


  • 2.  RE: Route a call percentage ?

    Posted 04-03-2020 07:18
    Calling a lambda function to generate a random number is how i've done this in the past. It's not very difficult. I'm not sure if there's a function built into architect or not.

    ------------------------------
    Dean Thames
    Koch Business Solutions
    ------------------------------



  • 3.  RE: Route a call percentage ?

    Posted 01-25-2021 06:31
    Good day,
    just a follow up if you managed to get this working as i need to distribute calls between 2 queue's at 80\20 % of incoming calls

    ------------------------------
    Reginald Sheraton
    ------------------------------



  • 4.  RE: Route a call percentage ?

    Posted 01-25-2021 07:01

    This is a bit of a do it yourself thing as there's no built in function to accommodate it (far as I know) 

    Lately I've been using the GetCurrentDateTimeUtc expression to parse out the miliseconds value and use that as a random integer to make decisions on. Technically it's not random, but it's close. 

    For example, considering a utc date time value of 2020-11-05T13:15:30Z,  

    Task.RandInt == ToInt(Left(Right(ToString(GetCurrentDateTimeUtc()),3),2)) will give you an integer of 30 stored in the variable "Task.RandInt"

    You can then make a decision boolean task like so:  Task.RandInt > 20 

    True = go to Queue A
    False = Go to Queue B

    Using that, the volume will even out to an 80/20 split over time.

    If your dispersion needs to be more exact, you could create a count function that updated a value in a data table to increment up by one from 0 to 10 on each inbound call. Then you can routing decisions on that value, re-setting it to 0 it after it gets to 10. 



    ------------------------------
    Dean Thames
    Koch Business Solutions
    ------------------------------



  • 5.  RE: Route a call percentage ?

    Posted 01-25-2021 07:08
    thanks will give it a try

    ------------------------------
    Reginald Sheraton
    ------------------------------



  • 6.  RE: Route a call percentage ?

    Posted 01-29-2021 01:13
    Good Day,
    just need some clarity on the below as i don't see any option to write data back into Data Table, only to get Data, do i use a Data Action?

    If your dispersion needs to be more exact, you could create a count function that updated a value in a data table to increment up by one from 0 to 10 on each inbound call. Then you can routing decisions on that value, re-setting it to 0 it after it gets to 10. 

    ------------------------------
    Reginald Sheraton
    ------------------------------



  • 7.  RE: Route a call percentage ?

    Posted 01-29-2021 07:35
    You would need to create data table first, then create a data action for the platform api to write back into that table based on an event in the call flow... in this case it'd be an n+1 equation that would take the current value in the row and add one to it. You could also have a logic block there that would check and set the value back to 0 every time it reaches 10 (or 100, or 1,000, etc....). 

    Refer to the api explorer in developer tools: 

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

    Will add the passed in row entry to the datatable with the given datatableId after verifying it against the schema. The DataTableRow should be a json-ized' stream of key -> value pairs { "Field1": "XYZZY", "Field2": false, "KEY": "27272" }

    ------------------------------
    Dean Thames
    Koch Business Solutions
    ------------------------------



  • 8.  RE: Route a call percentage ?

    Posted 01-29-2021 07:44
    Here's an example of an request body that i'm using with the above api to write to a data table i'm using to run a test of a speech recognition application. Each time a tester runs through the script, the application writes the data associated with the test to a data table. That way we can get an idea of how well that application is performing. 


    {
    "key":"datetime",
    "testnumber":"34",
    "callerid":"+1xxxxxxx",
    "type":"order",
    "outcome":"success",
    "value":"ab65894"
    }

    ------------------------------
    Dean Thames
    Koch Business Solutions
    ------------------------------



  • 9.  RE: Route a call percentage ?

    Posted 01-29-2021 07:45
    Hi there,
    Thanks, managed to get this working 100% with the below

    If your dispersion needs to be more exact, you could create a count function that updated a value in a data table to increment up by one from 0 to 10 on each inbound call. Then you can routing decisions on that value, re-setting it to 0 it after it gets to 10. 

    ------------------------------
    Reginald Sheraton
    ------------------------------



  • 10.  RE: Route a call percentage ?

    Posted 07-23-2021 08:53
    Edited by Nadia Akel 07-23-2021 08:53
    Hi Reginald, would you mind sharing the details on how you did it please, that would be fantastic! 
    thanks,
    Nadia

    ------------------------------
    Nadia 

    ------------------------------



  • 11.  RE: Route a call percentage ?

    Posted 07-23-2021 09:13
    Hi Nadia,
    I can share the Call Flow and other data if required

    ------------------------------
    Reginald Sheraton
    ------------------------------



  • 12.  RE: Route a call percentage ?

    Posted 07-23-2021 09:48
    Yes please, I'm struggling with my API's here, and it seems I'm loosing track...
    :-)
    Nadia

    ------------------------------
    Nadia Akel
    Ingenico Group SA
    ------------------------------



  • 13.  RE: Route a call percentage ?

    Posted 12-06-2021 10:59
    Hi Reginald,

    Would you kindly be able to share the call flow?

    Regards,
    Shwetha

    ------------------------------
    Shwetha Chandavar
    Conn3ct (Connect Managed Services (UK) Limited)
    ------------------------------



  • 14.  RE: Route a call percentage ?

    Posted 06-13-2023 08:18

    Hi Reginald, would it be possible to share the callflow and other data? I just got a question about A/B testing and would you described and have build seems to be suitable for us and this initial test.



    ------------------------------
    Dennis van Steenbergen
    NN Insurance Eurasia N.V.
    ------------------------------



  • 15.  RE: Route a call percentage ?

    Posted 06-13-2023 10:40

    Hi Everyone,

    +1 for the above request, would be great to see an example of this as I am also in need to create an AB test where I allocate 30% of calls to a certain part of an architect flow.

    Thanks
    Daniel



    ------------------------------
    Daniel
    ------------------------------



  • 16.  RE: Route a call percentage ?

    Posted 06-13-2023 14:26

    Personally, I would avoid using Data Tables for this. There is a reason you don't see a write to table operation! They are intended to be efficient read only lookup tables.

    As I see it, using a Data Table to store counters in this way is not scalable, for at least two, possibly three, reasons...

    1. You run the risk of hitting API Rate Limits if your call center is busy.
    2. You run the risk of what are known as "race" conditions. Let me explain. Let us assume that you have a value, stored in a Data Table, which currently has the value 1, and which your flow will increment. Two calls (A & B) come in if VERY quick succession. Call A retrieves the current value (1), increments it and then calls the API to write the new value (2) back. However Call B retrieves the value before the write happens, so it also gets a current value of 1, increments it and then calls the API to write the new value (also 2) back. So afterwards, the value in the Data Table is 2, whereas it should be 3. This will only get worse as load increases.
    3. (Possibly, depending on the internal architecture of Genesys Cloud, so take this as a theory, not a fact....) Genesys Cloud, as we all know, runs in AWS, which means the Microservices are spread across multiple servers in an Amazon Datacenter. Additionally, multiple instances of each Microservice can be spun up, depending on load. Since Data Table are meant to be efficient, Read-Only lookups, it is likely they are kept in memory and synchronized as necessary. When updating periodically, latency in those updates of a few seconds won't be noticeable, but in this instance (again, under load) I can foresee serious sync issues being possible. Whether that's old (outdated) values being served up, to different instances reading the tables, or even writes "clashing" between instances that run separately, it's a risk that I don't think is worth taking.

    Remember, Genesys Cloud isn't like a Prem solution (such as PureConnect) which runs on a single server that can have shared memory locations (Global Variables, Accumulators etc.) If you can, use a stochastic approach (either use a random number generator, or base the decisions on something like the last digit of the time, in milliseconds) or create an external storage location with a REST API on it that you can access to store these values.

    Just my 10 cents!



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



  • 17.  RE: Route a call percentage ?

    Top 25 Contributor
    Posted 06-13-2023 16:10

    I think the easiest method is really just doing RandomInt(100) and if less than 20 got to A, less than 55 goto B else go to C

    Yes you will have occasions where 10 calls in a row go to the same queue, but over time it will even out.

    The other option, instead of a data table is to do an analytics API call to check the calls answered/waiting/offered in the three queues, and then use that figure out which one should get the next call. This still has the API rate limit risk Paul mentioned. However this method ensures, even if one queue gets 2 calls in a row due to race conditions etc well that will get evened out over time, its self correcting.



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



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources