Tuesday, February 19, 2019

#683 Oracle Integration - Integrating with Oracle Field Service Cloud

I needed to get a demo together quickly for a customer visit and, thanks to my Field Service colleagues, that's just what I did.

The scenario is simple - create an Activity for a Field Service engineer.

My input payload to OIC is as follows -

{"resourceId":"33001",
"apptNumber":"APPT00002",
"activityType":"05",
"duration":40,
"timeSlot":"08-10",
"WO_TYPE":"COM",
"customerName":"Niall Commiskey",
"streetAddress":"Harmonstown Grove",
"city":"Sanford",
"postalCode":"32771"
}

Now to the fields above and a quick intro to Field Service.

resourceId -

is the id of the person to whom the task will be assigned.
So who hides behind the number 33001?











William Arndt is our man! A Stakhanovite of a worker!

activityType -



































so 05 is Commercial Facility Maintenance

apptNumber -
Appointment number

duration-
Time allocated to the activity

timeSlot-
in my case, between 08:00 and 10:00 am

WO_TYPE
Commercial (COM), Residential (RES) etc.

Here is the Integration -

REST Trigger then Invoke of the Field Service Adapter -
























REST Request / Response -



















Invoke of Field Service Adapter -




















Test via Postman -



Check in OFS -
























So now let's this to the next level -
Enter an Activity and assign customer Inventory to it.
e.g. get William to fix the customer's generator - the latter being the Inventory.


I can use a different operation for this -











More details on the Bulk Update Activity are available in the Oracle docs here








Here is the sample Request Payload -



























Now to my mapping -

Here is the Source - as you can see, I have augmented the request payload with the inventory fields -
























Here is the Target -
























As you can see above, I have hardcoded the updateParameters fields -

identifyActivityBy is set to "apptNumber" (Appointment Number)

ifInFinalStatusThen - what's this all about?

If the activity with apptNumber "APPT0004" exists in the system it will be updated, unless it is in the status 'Completed' (which means no changes will be performed according to the "ifInFinalStatusThen": "doNothing" option).

I'm glad that's cleared up!

The rest of the mappings are as before, except for the inventories section.

I test from Postman -
























Here I'm sending William out to fix Uncle Paudge's Compressor.

I check in OFS -

























No comments:

Post a Comment