Genesys Cloud - Developer Community!

 View Only

Sign Up

Expand all | Collapse all

What is the meaning of *durationMinutes* versus *dailyDurationMinutes* in an administrative "Time Off"-Request (and other questions about this Request)?

  • 1.  What is the meaning of *durationMinutes* versus *dailyDurationMinutes* in an administrative "Time Off"-Request (and other questions about this Request)?

    Posted yesterday

    The CreateAdminTimeOffRequest structure has fields to specify how many minutes should be taken off.
    It also has a field fullDayManagementUnitDates if the whole day is taken off, or partialDayStartDateTimes
    for taking off only a part of a day.
    But there are two fields to specify the amount of time off to take:

    - durationMinutes is an array of numbers, which should have the same number of elements as the fullDayManagementUnitDates resp. partialDayStartDateTimes field. This is, I presume, the number of minutes taken off for each day. Except if we make a mistake and include a Sunday in the list of days to be taken off, then this array must have one item less - how does this array relate to the "dates"-Array then? But ok, including a Sunday is in principle a case of bad input data.
    - dailyDurationMinutes is just a number - what does it mean? Especially if the time-off requests are for working days with a non-equal number of working hours? This is a mandatory field, so we must include it, but how does it relate to the previous field?

    This is especially confusing for situations where the number of working hours is not the same for each day.
    For example, if the working hours are 8.25 on Monday-Thursday, but 5.5 hours on Friday - what should the value of dailyDurationMinutes be?

    According to the API, dailyDurationMinutes is mandatory, but durationMinutes is not. If I only specify dailyDurationMinutes - is this interpreted as "this are the durations for each day, they are all the same"?

    There is an additional field, paidMinutes - this is not mandatory, but what are the defaults? Are per default the durationMinutes all paid? Or is the default taken from the ActivityCode?

    At last, there is another field in the request, paid (a boolean field) - it is not mandatory. If we do not specify it - is the default value something fixed, or is it taken from the acitvity code, which also contains such a field?

    Can anyone clarify the meaning(s) of these fields to me?

    Thanks in advance,

    Wolfgang Liebich


    #PlatformAPI

    ------------------------------
    Wolfgang Liebich
    ------------------------------


  • 2.  RE: What is the meaning of *durationMinutes* versus *dailyDurationMinutes* in an administrative "Time Off"-Request (and other questions about this Request)?

    Posted 10 hours ago

    Hi, thanks for reaching out. I spent some time discussing this with the team to make sure I provide an accurate response.

    • durationMinutes is an array of numbers, which should have the same number of elements as the fullDayManagementUnitDates resp. partialDayStartDateTimes field. This is, I presume, the number of minutes taken off for each day. Except if we make a mistake and include a Sunday in the list of days to be taken off, then this array must have one item less - how does this array relate to the "dates"-Array then? But ok, including a Sunday is in principle a case of bad input data.
    • dailyDurationMinutes is just a number - what does it mean? Especially if the time-off requests are for working days with a non-equal number of working hours? This is a mandatory field, so we must include it, but how does it relate to the previous field?

    dailyDurationMinutes is actually not always required (more on that below). This is a bug in the documentation for which I will open a ticket to address. dailyDurationMinutes is a legacy field that we missed updating the documentation for when we added the dailyDuration array.

    How this works: 
    1. If dailyDurationMinutes is specified, and the durationMinutes array is not populated, then dailyDurationMinutes will apply to all days in the request. Additionally, if payableMinutes is not populated, this value will be treated as the de facto payable minutes value for all days in the request. 
    2. If durationMinutes is populated, dailyDurationMinutes will be ignored and the values from dailyDuration will be used. Note: For this array, if specified it must be exactly equal in size to the fullDayManagementUnitDates array in the request or you will receive a validation error. If you mistakenly add an extra day you'll have to put a 0 for that day or, preferably, update your request to remove that day and try again.

    Note that while both fields (should) be marked optional, at least one of the two fields IS required. If neither are provided that will result in a validation error. 

    There is an additional field, paidMinutes - this is not mandatory, but what are the defaults? Are per default the durationMinutes all paid? Or is the default taken from the ActivityCode?

    At last, there is another field in the request, paid (a boolean field) - it is not mandatory. If we do not specify it - is the default value something fixed, or is it taken from the acitvity code, which also contains such a field?

    I believe the fields you are referring to is payableMinutes (an array of Integers) and paid, a boolean. 

    paid is simply a boolean indicating whether the request is considered a paid time off request.

    payableMinutes refers to how many minutes of the agent's underlying schedule would have been paid if the time off request weren't present.

    If paid is set to false, then the payableMinutes will not be used for computing shift paid time. If set to true and payableMinutes is not set, dailyDurationMinutes will be used. If paid is not specified, then it will default to the value specified by the activity code.

    If either durationMinutes or payableMinutes are not provided in the request, then dailyDurationMinutes must be provided; however the preferred pattern is to use durationMinutes and payableMinutesexplicitly.



    ------------------------------
    Brian Trezise
    Genesys - Employees - Lead Software Engineer
    ------------------------------