Why isn't Oracle Field Service returning 'timeZoneIANA' value for REST API request 'whereIsMyTech'?
Environment:
Oracle Field Service (OFS)
Issue:
I have sent a REST API 'whereIsMyTech' request to retrieve activity status and technician information with activity optional parameter "timeZoneIANA". Activity ID is a required parameter for this request.
Request
https://api.etadirect.com/rest/ofscCore/v1/whereIsMyTech?
activityId=2663332&includeAvatarImageData=false&resourceId&
activityFields=timeZoneIANA,date,serviceWindowStart,
serviceWindowEnd,startTime,endTime,deliveryWindowStart,
deliveryWindowEndActivity
As response, I receive "status": "notAssigned" and 'timeZoneIANA' is not returned.
Response
"status": "notAssigned",
"activityDetails": {
"date": "2019-12-20",
"serviceWindowStart": "13:00:00",
"serviceWindowEnd": "16:00:00",
"endTime": "2019-12-20 00:40:00",
"activityId": 2663332
}
}
Resolution:
The value 'notAssigned' is returned when the activity is not assigned to a technician and the activity status is 'pending'.
In the above case, activity was assigned to a Resource Type 'Bucket'. In the activity details, the fields requested in the activityFields parameter are returned but the "start time" and the time zone information are not returned - as these are unknown at this point.
To ensure your REST 'whereIsMyTech' request returns the optional field 'timezoneIANA', make sure the activity is placed in a route of a Field Resource.