Field Service

Get Involved. Join the Conversation.

Topic

    Vijayalakshmi Arunachalam
    OFS - Assign Resoruce to Activity
    Topic posted February 2, 2018 by Vijayalakshmi ArunachalamBronze Medal: 1,250+ Points 
    170 Views, 12 Comments
    Title:
    OFS - Assign Resoruce to Activity
    Content:

    Requirement:
    Oracle Service Cloud (OSC) will send Dateandtime(in timestamp) format for an activity. From that we will extract Date(2018-02-01) and time (10:12) and calling FindMatchingResource to find available resources list for that date and free time slot. We need to extract available Field Engineers for the given time slot and in the same work zone. I believe FindMatchingResource will be right API for this requirement.

    In this API Call I can pass activityID, date, criteria :{workTime: , resourcePreference, workZone) but don't know what value I need to give in the workzone. The output always shows "100" ratio value.

    Could you please help to get exact output? 

    https://docs.oracle.com/cloud/latest/fieldservicecs_gs/CXFSC/op-rest-ofscCore-v1-resources-custom-actions-findMatchingResources-post.html

    If I am looking wrong API also please suggest me the right API. But the requirement is get available resource for provided date and time and zone. Then we will get that resource id and assign that activity to that resource by programmatically.

    Thanks,
    Viji

    Image:

    Comment

     

    • Hardik Gupta

      Hi Viji,

      You are using the right API method.
      As far as I understand from the question you have query for workzone ratios.

      The ratio value is updated in workzone when a Workzone is added to a resource.
      The concept in OFSC is that, for example if a resource has 3 workzones(WZ1, WZ2, WZ3) and mostly he/she performs activities in WZ1 then 100 can be updated for WZ1. Suppose WZ2 he/she has to go for few times that can be updated as 50 or 30. Resource attends activities WZ3 is only in exception scenarios then you can assign 10.
      Higher number in ratio indicates preffered workzone.

      The default value for ratio is 100.

      You can change the ratio values and then once again check for the output.

      Alternative to using the APIs and development:

      In your case the activities are already in OFSC, then I suggest you should just use the automatic routing feature provided by the application. OFSC will take care of the rest and activities will get routed directly.This will save a lot of development time.

      Regards,
      Hardik

    • Vijayalakshmi Arunachalam

      Thank you Hardik for your response in detail. Appreciated. Can you please briefly explain the below scenario you have explained,

      Alternative to using the APIs and development:

      In your case the activities are already in OFSC, then I suggest you should just use the automatic routing feature provided by the application. OFSC will take care of the rest and activities will get routed directly.This will save a lot of development time.

       

       

      I will configure workzone ratio value and check the output. Thanks for your explanation.

       

      Thanks,

      Viji

    • Zsolt Tolgyesi

      Hi Viji,

      Over that what we've talked in messages, the following enhanced option may interest you:
      http://www.oracle.com/webfolder/technetwork/tutorials/tutorial/cloud/service/18A-field-service-wn.htm#F2288
      "The findMatchingResources API has been improved allowing searches to get matching resources without the need to create an activity."
      in OFSC 18A

      Regards,
      Zsolt

    • Vijayalakshmi Arunachalam

      Hi Zsolt,

      Thank you so much for the link. Will go through and check how it helps for my requirement. Appreciated. 

       

       

      Thanks,

      Viji

    • Vijayalakshmi Arunachalam

      Hi Hardik,

      I have created 3 work zones as you suggested and assign to the resource work zone with Ratio value will 100 , 30 and 50. But When I do search with workzone:50 but always get the results workzone:100. So, didn't understand the concept behind this workzone calculation. 

       Would appreciate if you could provide more information. Thank you!

       

      Thanks,

      Viji

    • Vijayalakshmi Arunachalam

      Hi Zsolt,

      Thank you so much for the link. We are using API release in version August 2017, do we need to do any configuration to use the improved version of API. When i tried to access improved API parameters error shows it still pointing only August 2017 API version not the improved version. But, in the documentation link you have provided stating no more configuration needed. Any idea?

      Thanks,

      Viji

    • Vijayalakshmi Arunachalam

      I have tried improved API call with the input parameters. Attached Image for the error message. I don't know what configuration I am missing. Any idea

       

       

       

    • Zsolt Tolgyesi

      Hi Viji,

      As I said your WZ configuration is based on a field (or fields). That data need to be included in the call, because without it the system is unable to assign the right WZ to the activity. Configuration / Work Zone / "Work Zone Key: xxxx (6, case insensitive)"
      Or do you miss the point to both technician and activity must have WZ?

      Regards,
      Zsolt

    • Vijayalakshmi Arunachalam

      Hi Zsolt,

       

      Improved API concept works for me. Thank you much to provide the details to resolve my issue. Did all configurations required for this API call and got the output expected.

       

      Appreciated.

       

      Thanks,

      Viji

    • Vijayalakshmi Arunachalam

      Hi folks,

       

      Is there any way we can available resources without passing postal code(workzone key value)/

      Requirement is passing timezone and get the available resources and free time slots of the same. Any idea? Thanks much in advance for help.

      "activity":
      {
      "timeZone":"America/Los_Angeles",
            "activityType": "Example",
            "duration": 60,
            "timeSlot": "TEST",
            "customerName": "John Doe",
            "streetAddress": "",
            "city": "",
            "postalCode": "10001",
            "stateProvince": "CA",
        "apptNumber": ""
      },
      "date": "2018-02-13",
      "schedulesToReturn": ["2018-02-13"],
      "criteria": {"workTime":61, "resourcePreference":1},
      "fields": ["name","resourceInternalId","timeZone"],
      "limit":10
       
      }
    • Vijayalakshmi Arunachalam

      Hi ,

       

      How can we get resources assigned to the  particular work skill regardless of work zone? If I assign work skill to particular resource, that resource is not displayed in the output regardless I get all the bunch of resource list doesn't assigned any work skill. Is there a way to get resources only to the specific work skill?

       

      I have created activity type and respective work skill and work skill condition. I am searching resources by using 

       

      {
       
      "activity":
      {
      "timeZone":"America/Los_Angeles",
            "activityType": <<activity type>",
            "duration": 60,     
            "customerName": "John Doe",
            
      },
      "date": "2018-02-15",
      "schedulesToReturn": ["2018-02-15"],
      "criteria": {"workTime":61, "resourcePreference":1, "workSkill":1},
      "fields": ["name","resourceInternalId","timeZone"],
      "limit":50
       
       
      It returns bunch of unassigned work skill resources rather to give only 2 resource who is assigned to particular workskill
       
       
    • Zsolt Tolgyesi

      Hi Viji,

      Maybe this is the answer what you are looking for: if a resource doesn't have direct skill assigned (and not on parent level too) then this situation is treated as he has all the available skills with maximal level.

      Regards,
      Zsolt