Field Service

Get Involved. Join the Conversation.

Topic

    Bruno Vasconcellos
    get_capacity and get_quota_data for a date picker
    Topic posted August 16, 2019 by Bruno VasconcellosBlue Ribbon: 750+ Points, tagged API / Integration, Capacity / Quota 
    19 Views
    Title:
    get_capacity and get_quota_data for a date picker
    Summary:
    I'm trying to develop a date picker and get data from OFSC via SOAP API
    Content:

    Hi,
    We're trying to develop a date/time picker integrating with Oracle Field Service. The user should be able to pick a free date (any timeslot available) and a free timeslot and create an activity in that time slot. We are not using work zones and inventories, neither booking or routing.

    We're trying two different approaches:
    - Using get_capacity SOAP API
    - Using get_quota_data SOAP API

    The first problem we encountered is with the get_capacity return data: it was empty. We don't know when it started but at first it contained all the time slot information and capacity. The current configuration in "Quota Management" is "Based on Time Slots", all "Quota Definition" levels, and minutes as unit (as the print screen in attachment shows). It's empty when there are no activities and It has data when there are activities in that day, and only about the time slots allocated.

    So, we can't use the get_capacity to get all time slot informations (even with the flag activated, as the XML attachment shows), this is bad when we try to develop a dynamic date/time picker. So we tried using get_quota_data insted:

    It worked, kind of, we got all the quota and time slot information, but we got another issue: we have different activities durations:

    Here is an example:
    - Activity type #1 is a 15 minutes activity
    - Activity type #2 is a 45 minutes activity
    - Time slot is 30 minutes long

    When we allocate an activity #1 in an 30 minutes time slot, we have "max_available" equal 30 minutes, "used" equal 15 minutes, we have 15 minutes left. We can't allocate type #2 in theory, or we can allocate but it will fill part of the next time slot.

    Another possibility is the reverse: we allocate an activity #2 and it exceed the time slot limit and it uses part of the next time slot.

    Oracle Field Service lets you add an activity to an used or even filled time slot, but when we use the get_quota_data SOAP API, we don't get the information about the delayed activity and the second time slot have full capacity and no "used" property, but in reality we can't allocate another activity in that time slot.

    So what are we looking for:
    A way to get the availables time slots, with different activity durations, via SOAP API, so we can show a date/time picker UI to the user and allocate in a reliable way.

    Attachment show two activities with 45 minutes and 180 minutes in a 60 minutes time slot, and the configuration of the bucket.
    PS.: Yes, i'm using the <user> authentication and it's working, i just removed for security purposes

    Version:
    19C
    Image:
    Document:
    Document:
    Document: