Field Service

Get Involved. Join the Conversation.


    Sachin Rathod
    How does capacity/time intervals work ?
    Topic posted June 13, 2017 by Sachin RathodBlue Ribbon: 750+ Points, tagged Capacity / Quota 
    159 Views, 3 Comments
    How does capacity/time intervals work ?

    Hi All,

    I am trying to see whether I can make capacity intervals (Configuration --> Business Rules --> Quota Management --> Capacity Intervals)  work.

    I added couple of capacity intervals which are not same as time-slots. e.g. 09:10 - 10:30 as capacity intervals.

    When I went to bucket enabled for Quota Management (Dispatch --> Quota then View --> View Capacity) I could see against each capacity category / capacity intervals combination capacity, hours for each interval. Please note these are totally different then time-slots. As shown in screen shots.

    Now when I try to find the capacity using REST API  -- /rest/ofscCapacity/v1/activityBookingOptions

    I am getting response as

    "date": "2017-06-13",
                "areas": [
                        "label": "South_East",
                        "name": "South East ATT Bucket",
                        "reason": "noCapacity",
                        "bucket": "South_East",
                        "timeZone": "Etc/GMT"

    I am not sure how to add quota for these booking/time/capacity intervals and how do I make it work to see capacity/quota available using the REST api.

    API Request =,2017-06-14&activityType=DEINSTALLATION&postalCode=63043&determineCategory=true&minTimeBeforeArrival=10&determineAreaByWorkZone=true&estimateDuration=true&estimateTravelTime=true

    Attached screen shots for reference

    1. Capacity Intervals configuration

    2. Quota details for that bucket.(2 snapshots a. config and b. capacity details)

    3. API request/response

    Please let me know how can I get response using API ActivityBookingOptions when I am using Capacity/Booking Intervals options and not time-slots.



    • Sachin Rathod

      Attaching files if not available.

    • Foad Mobini Kesheh

      The data set on the environment and the data returned by quota and capacity REST endpoints doesn't seem to correlate very well. I'm having lot of dificulties to make it work as well.

    • Ravi Shankar


      Firstly, time intervals are not returned in getActivityBookingOptions API call. You will still have to enable time slots for the capacity bucket (not in the configuration but resource time slots) i.e. resource. If you dont enable time slots at the resource level you will not get time slots and their status.

      After enabling time slots, you will get the time slots in the response but not the amount of capacity available per time slot - check below URL after following the above steps; note that if sufficient capacity is unavailable for a time slot then you will see "noCapacity" in the response using which you should decide whether to go for overbooking or show the the remaining time slots to the customer by removing "noCapacity" time slots; if no time slots exist for a day inform the customer that no time slots available for a day.

      In the above URL, change the date to the current day and you should be getting the common time slots associated to the resource and capacity category. Since you are using past dates you are getting "noCapacity" as reason at bucket level.,2018-01-10,2018-01-11,2018-01-12&activityType=DEINSTALLATION&postalCode=63043&determineCategory=true&minTimeBeforeArrival=10&determineAreaByWorkZone=true&estimateDuration=true&estimateTravelTime=true

      "getBookingOptions" considers the following:
      1. Work zone key sent in the request - here I understand postalCode as the work zone key. Hope there is a corresponding work zone associated for the postal code and work zone is attached to a capacity bucket.
      2. Work skills - other than activity type, I dont see any other attribute. Activity type should be part of the work skill and correspnding condition. After this, the work skill should be attached to a capacity category.
      3. Capacity Category set in # 2 above is attached to a capacity bucket.

      Based on your response, I see all these being set but you might want to check again.

      Some more points to observe here:

      1. Remaining Quota: This attribute tells you the number of minutes available after booking the activity based on the response. Total available quota is sum of duration+travel+remainingQuota.
      2. Time Intervals: As mentioned above, you will not get time intervals back in the response.
      3. Time Intervals can be obtained in the getCapacity call (if you are using 17.8). Booking can be closed based on time intervals using "update booking closing schedule" API call (again in 17.8).
      4. In time intervals feature, quota is added for a capacity bucket or capacity category. Not for time intervals.