Thursday, November 5, 2020

#805 OIC - Oracle Field Service via REST

 Yes, there is an Oracle Field Service Adapter in OIC and yes, it provides compelling functionality in respect of common use cases, such as the one described in the OFS adapter documentation -

This scenario describes the interaction between the Oracle Field Service and an application that receives and processes alerts for municipal services.

• A municipal employee receives an alert on the municipal services monitoring application indicating that there is a natural gas leak near a busy downtown intersection.

• The municipal employee creates a work order to dispatch a service team to the site. All details necessary to locate the natural gas leak are included in the work order.

• The municipal employee saves and submits the work order on the municipal services monitoring application.

• The work order is sent to the Oracle Field Service Adapter.

• The Oracle Field Service Adapter creates a matching activity in Oracle Field Service and returns the activity identifier to the municipal services monitoring application to allow the progress of the work order to be monitored.

• Oracle Field Service assigns the activity to the service team.

• The lead Engineer for the service team uses the mobile Oracle Field Service application to review the work order and identify the location of the natural gas leak.

• The service team repairs the natural gas leak and the lead Engineer uses the mobile Oracle Field Service application to change the status of the work order to completed.

• Oracle Field Service sends an activity completed notice for the work order to Oracle Field Service Adapter.

• The Oracle Field Service Adapter forwards the activity completed notice for the work order to the municipal services monitoring application.

• The municipal services monitoring application identifies the work order as resolved and it is closed

So what happens if I need to do something the adapter does not support?

In my case, customer wants to sync Capacity and Quota data to a 3rd Party system.

Enter the OIC REST adapter leveraging the OFS REST APIs.

The apis are detailed here














Capacity, for example, is not covered by the OFS adapter.

So let's check out how to leverage some of those apis via the REST adapter.












username is in the following format - applicationID@tenancy 

Here is mine from OFS - 











password is set the Client Secret.

Note, the error message - user is not permitted...

I check out bot's permissions in OFS - 










I click the +












I retry the Postman request and get over the permissions error -












Now time to read the docs - I need a dates parameter -













Ok, now let's get this working in OIC -

Connection Definition -













Here is the configuration of the connection in a scheduled integration -

















I set the Response to that from my Postman test -











Note the error - 









I amend the sample Response as follows - taking the Response from the REST API docs example -


 










The Mapping - 









Now to test -

















No comments: