Access to Custom Plug-Ins
You can directly access custom plug-ins within the Oracle Field Service Mobile Application for Android or iOS or the Core Application. You can access such pages from any custom Android or iOS app or through specific direct URLs.
Based on the page from where the plugin is accessed and the user type accessing the plugin, you can send the following parameters with the URL:
Name | Type | Description | Constraints |
---|---|---|---|
plugin |
String |
Specifies the plugin to access. |
The label must belong to a valid plugin. The plugin must be configured on one of the pages for the logged in user. |
contextScreen |
String |
Specifies the context page from which the plugin is accessed. |
The following
Context Screen labels are supported:
Context pages have the same validations as page navigation. The order of the parameters is not important. |
date |
Date |
Specifies the date for the context page. |
Date format must be YYYY-MM-DD. |
activityId |
Number |
Specifies the activity for the context page. |
A valid Activity ID is required. |
resourceInternalId |
Number |
Specifies the resource for the context page. |
Must be a valid resourceInternalId. Mandatory if you access the ID from the Supervisor page. |
inventoryId |
Number |
Specifies the inventory for the context page. |
A valid Inventory ID is required. |
External data: Except for the above parameters, all the passed parameters are sent to the plugin with the externalData key. If the same key is provided multiple times then the data is sent to the plugin as an array with the specified key.
Encoding data: If the data that you want to send has special characters then it must be URL encoded.
Passing Single Key Data
URL: https://<OFS_CORE_APP_URL>/#plugin=<PLUGIN_LABEL>&contextScreen=activity_list&speed=44.5&distance=11&model=V1
{
"apiVersion": 1,
"method": "open",
"entity": "activityList",
"resource": {},
"activityList": {
"4225438": {
"aid": "4225438"
},
"4225439": {
"aid": "4225439"
}
},
"inventoryList": {
"21064417": {
"invid": "21064417"
},
"21064418": {
"invid": "21064418"
}
},
"openParams": {},
"externalData": {
"speed": "44.5",
"distance": "11",
"model": "V1"
}
}
Passing Array Data
URL: https://<OFS_CORE_APP_URL>/#plugin=<PLUGIN_LABEL>&contextScreen=activity_list&zipcodes=35801&zipcodes=06101&zipcodes=62701status=completed
{
"apiVersion": 1,
"method": "open",
"entity": "activityList",
"resource": {},
"activityList": {
"4225438": {
"aid": "4225438"
},
"4225439": {
"aid": "4225439"
}
},
"inventoryList": {
"21064417": {
"invid": "21064417"
},
"21064418": {
"invid": "21064418"
}
},
"openParams": {},
"externalData": {
"zipcodes": ["35801", "06101", "62701"],
"status": "completed"
}
}
Passing data with special characters
Original Data: "https://www.oracle.com/index?q=encoding"
Encoded Data: "https%3A%2F%2Fwww.oracle.com%2Findex%3Fq%3Dencoding"
URL: https://<OFS_CORE_APP_URL>/#plugin=<PLUGIN_LABEL>&contextScreen=activity_list&targetURL=https%3A%2F%2Fwww.oracle.com%2Findex%3Fq%3Dencoding
{
"apiVersion": 1,
"method": "open",
"entity": "activityList",
"resource": {},
"activityList": {
"4225438": {
"aid": "4225438"
},
"4225439": {
"aid": "4225439"
}
},
"inventoryList": {
"21064417": {
"invid": "21064417"
},
"21064418": {
"invid": "21064418"
}
},
"openParams": {},
"externalData": {
"targetURL": "https://www.oracle.com/index?q=encoding"
}
}
Passing JSON Data
Original JSON String: {"street":"479 South Manor Station Drive","city":"Glenview","state":"IL","zipcode":"60025"}
Encoded JSON String: %7B%22street%22%3A%22479%20South%20Manor%20Station%20Drive%22%2C%22city%22%3A%22Glenview%22%2C%22state%22%3A%22IL%22%2C%22zipcode%22%3A%2260025%22%7D
URL: https://<OFS_CORE_APP_URL>/#plugin=<PLUGIN_LABEL>&contextScreen=activity_list&address=%7B%22street%22%3A%22479%20South%20Manor%20Station%20Drive%22%2C%22city%22%3A%22Glenview%22%2C%22state%22%3A%22IL%22%2C%22zipcode%22%3A%2260025%22%7D
{
"apiVersion": 1,
"method": "open",
"entity": "activityList",
"resource": {},
"activityList": {
"4225438": {
"aid": "4225438"
},
"4225439": {
"aid": "4225439"
}
},
"inventoryList": {
"21064417": {
"invid": "21064417"
},
"21064418": {
"invid": "21064418"
}
},
"openParams": {},
"externalData": {
"address": "{\"street\":\"479 South Manor Station Drive\",\"city\":\"Glenview\",\"state\":\"IL\",\"zipcode\":\"60025\"}"
}
}
Open Plugin from Activity List page
URL: https://<OFS_CORE_APP_URL>/#plugin=<PLUGIN_LABEL>&contextScreen=activity_list&serialNo=49126
{
"apiVersion": 1,
"method": "open",
"entity": "activityList",
"resource": {},
"activityList": {
"4225438": {
"aid": "4225438"
},
"4225439": {
"aid": "4225439"
}
},
"inventoryList": {
"21064417": {
"invid": "21064417"
},
"21064418": {
"invid": "21064418"
}
},
"openParams": {},
"externalData": {
"serialNo": "49126"
}
}
Open Plugin from Activity Details page
URL: https://<OFS_CORE_APP_URL>/#plugin=<PLUGIN_LABEL>&contextScreen=activity_by_id&activityId=4225439&date=2020-02-27&serialNo=49126
{
"apiVersion": 1,
"method": "open",
"entity": "activity",
"resource": {},
"activity": {
"aid": "4225439"
},
"inventoryList": {
"21064417": {
"invid": "21064417"
},
"21064418": {
"invid": "21064418"
}
},
"openParams": {},
"externalData": {
"serialNo": "49126"
}
}
Open Plugin from Inventory List page
URL: https://<OFS_CORE_APP_URL>/#plugin=<PLUGIN_LABEL>&contextScreen=activity_by_id&activityId=4225439&date=2020-02-27&serialNo=49126
{
"apiVersion": 1,
"method": "open",
"entity": "inventoryList",
"resource": {},
"activityList": {
"4225438": {
"aid": "4225438"
},
"4225439": {
"aid": "4225439"
}
},
"inventoryList": {
"21064417": {
"invid": "21064417"
},
"21064418": {
"invid": "21064418"
}
},
"openParams": {},
"externalData": {
"serialNo": "49126"
}
}
Open Plugin from Inventory Details page
URL: https://<OFS_CORE_APP_URL>/#plugin=<PLUGIN_LABEL>&contextScreen=inventory_by_id&inventoryId=21229417&serialNo=49126
{
"apiVersion": 1,
"method": "open",
"entity": "inventory",
"resource": {},
"activityList": {
"4225438": {
"aid": "4225438"
},
"4225439": {
"aid": "4225439"
}
},
"inventory": {
"invid": "21229417"
},
"openParams": {},
"externalData": {
"serialNo": "49126"
}
}
Access OFS native app from other Android or iOS native apps
Accessing any of the URL formats and examples listed earlier from an Android or iOS device prompts you to open the link in a native app (if installed) or the web app using a browser.
However, if you don’t have the option to open the native app in the browser and you must open the OFS native app from another native app, then replace the link "https://<OFS_CORE_APP_URL>" with "com.oracle.OFS://", (everything else the same) in each of the above links.
Access to Pages and Plug-Ins in Offline Mode
To access the pages and plug-ins related to the activities of past or future dates, if the application (native app or web app) can access the specified activity in the Offline mode, then the links to inner pages also work for those activities.