Genesys Cloud - Main

 View Only

Discussion Thread View
Expand all | Collapse all

I'm creating an on-call rotation flow. Is there a way in Architect to automatically check who is on call based on the week of the month?

  • 1.  I'm creating an on-call rotation flow. Is there a way in Architect to automatically check who is on call based on the week of the month?

    Posted 11 days ago

    I'm trying to create a flow that checks who is on call for the week, but I can't find a field in the Operating Schedule that allows the schedule to repeat once every month. Is there a better way to automate this process?


    #Routing(ACD/IVR)
    #Unsure/Other

    ------------------------------
    Jean Lam
    ------------------------------


  • 2.  RE: I'm creating an on-call rotation flow. Is there a way in Architect to automatically check who is on call based on the week of the month?
    Best Answer

    Posted 9 days ago

    Hopefully you've already spotted this, but just below the date you select the frequency you want.

    And from there you can select if you want it to be the first of every month, of the 2nd Wednesday of every month etc

    Or select custom and write your own rrule, or ask an AI to do that for you, and check its work!

    RRULE:FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYMONTHDAY=1,2,3,4,5,6,7

    Plug that in
    Check your working

    So this rule will be the first 7 days of the month, 1st through to 7th regardless of day of week, but without knowing your full requirements this is a starting point.



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



  • 3.  RE: I'm creating an on-call rotation flow. Is there a way in Architect to automatically check who is on call based on the week of the month?

    Posted 8 days ago

    Thank you Anton. I will review your reply.



    ------------------------------
    Jean Lam
    ------------------------------



  • 4.  RE: I'm creating an on-call rotation flow. Is there a way in Architect to automatically check who is on call based on the week of the month?

    Posted 7 days ago

    Hi Jean,

    If I understand your request correctly, you want to know who is on-call from a set of users where they may need to be called out to help customer when they call out-of-hours. If this is the scenario, we implemented a solution for this it is not purely on Genesys. Our on-call schedules are setup in Service-Now and we use an API to pull this information and based on who is primary/secondary/escalation, we make the relevant calls via Genesys.

    The above method by Anton seems great too but I am not sure how it will incorporate a set of rotational users every week/month etc. Would be good to know how you eventually end-up doing this.

    Regards



    ------------------------------
    Vineet Kakroo
    Senior Technical Consultant
    ------------------------------



  • 5.  RE: I'm creating an on-call rotation flow. Is there a way in Architect to automatically check who is on call based on the week of the month?

    Posted 7 days ago

    Hi Vineet,

    Yes, you are correct. My initial goal was to design an Architect flow that utilizes a schedule or another function to determine the on-call person based on the week of the month. If the Helpdesk calls that number, the system will automatically route the call to the designated on-call individual.

    I was hoping this could be accomplished entirely within Genesys, as ServiceNow is not available.



    ------------------------------
    Jean Lam
    ------------------------------



  • 6.  RE: I'm creating an on-call rotation flow. Is there a way in Architect to automatically check who is on call based on the week of the month?

    Posted 7 days ago
    Edited by Anton Vroon 7 days ago

    Hi Jean

    You could do this with just a Datatable, have each person listed in there, numbered by rotation order.

    And in architect you can then use something like the WeekNum function to get the week - this returns the week of the year, so 1 - 52

    And you could then do a mod 4 calculation on that so that you always get 1 2 3 or 4 in rotation each week, and then lookup 1 2 3 4 in the schedule to figure out who is on, - this works with 4 people sure, but you want 5 people, use mod 5 and so on.

    EDIT: My schedule option works too, you can also get the active schedule from a schedule group, do a look up based on which schedule is active against the data table to get who should be on, etc, or just do a bunch of individual schedule checks. Lots of way to accomplish this, just really depends on the finer details on your requirements. 



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



  • 7.  RE: I'm creating an on-call rotation flow. Is there a way in Architect to automatically check who is on call based on the week of the month?

    Posted 6 days ago

    Hi Anton,

    First step is the data table I created. Does this look correct?



    ------------------------------
    Jean Lam
    ------------------------------



  • 8.  RE: I'm creating an on-call rotation flow. Is there a way in Architect to automatically check who is on call based on the week of the month?

    Posted 6 days ago

    If you are going down the data table path, then yeah looks like a good start. (if you use a backup system, you might want the backup PhoneNumber too), or if they have forwarding enabled they might be able to just call the Genesys user instead.

    In architect you can then do something like Int Task.Rotation = WeekNum(Flow.StartDateTimeUtc) % 4

    On week 24 this is 0, Week 25 this is 1, Week 26 it is 2, Week 27 it is 3, Week 28 it is back to 0 and so it will loop around.

    So you might want to do  Int Task.Rotation = WeekNum(Flow.StartDateTimeUtc) % 4 +1 to get values from 1 through to 4 instead.

    Which you can then use as the input for the data table lookup to match against your WeekRotation

    Quick explanation of % Mod if needed. 

    % (mod function) returns the remainder after dividing one number by another. 

    If 7 people need to share 2 pizzas cut into 8 slices each (16 slices total), each person gets 2 slices (16 ÷ 7 = 2 with remainder 2). Those leftover 2 slices represent 16 % 7 = 2 (also written outside of Genesys as 16 mod 7)

    One of the side effects is, you can use it as a random number generator, or I can take an input like the now datetime and do mod 2 now I have a random 50/50 split function, or a check if even or odd function. 



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



  • 9.  RE: I'm creating an on-call rotation flow. Is there a way in Architect to automatically check who is on call based on the week of the month?

    Posted yesterday
    Edited by Jean Lam yesterday

    Hi Anton,
    I rebuilt the data table without the backup to keep things simple for now. However, I'm not sure if my flow is correct.

    1. Schedule group with weekly schedules
    2. Architect flow

      Data table look up expression: WeekNum(Flow.StartDateTimeUtc) % 4 +1



    ------------------------------
    Jean Lam
    ------------------------------



  • 10.  RE: I'm creating an on-call rotation flow. Is there a way in Architect to automatically check who is on call based on the week of the month?

    Posted yesterday

    Looks fine to me. Should work, if schedule is open and then it should find the current rotation in the data table, moving to the next one the following week.

    Highly encourage you switch on flow execution data while testing something like this out to see exactly what is happening each step of the flow. You can also test by using a set datetime rather than flowstarttime, just to see what it would do next week etc. 

    One option is to put the schedule name in your data table, then after the data table look up checking the schedule to see if it is during the right time to contact one of those people - depending on what you are after.



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



  • 11.  RE: I'm creating an on-call rotation flow. Is there a way in Architect to automatically check who is on call based on the week of the month?

    Posted 23 hours ago

    How does the data table direct the flow to dial the phone number associated with whomever is on call?  Will a Transfer to Number with an expression work?  And thx yes I'll use Flow Execution :) 



    ------------------------------
    Jean Lam
    ------------------------------



  • 12.  RE: I'm creating an on-call rotation flow. Is there a way in Architect to automatically check who is on call based on the week of the month?

    Posted 22 hours ago

    Depending on your setup, if you want to call them as Agent in Genesys who have forwarding enabled, you can do find user as an action or as a function, once you have the agent object you can transfer to user.

    Or just transfer to number (assuming number format in datatable is correct for outbound calling from Genesys)



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



Need Help finding something?

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