init Method
A message with the init method indicates that Oracle Fusion Field Service Core Application has started initializing the plugin.
{
"apiVersion": 1,
"method": "init",
"attributeDescription": {}
}
attributeDescriptionThe attributeDescription field is an object that contains the descriptions of all the properties that are configured for the plugin.
List of all buttons that are configured for a plugin is sent to the plugin in the 'buttons' field of the 'init' message. This field is a list of objects that contains the 'buttonId' and 'params' fields. buttonId is the 'context layout item id' of the button. 'params' is an object that represents the parameters that are configured for the corresponding context layout item. Each enum items of the "aworktype" (Activity type) property contains the "features" object. If the "Enable segmenting and extended duration" option is enabled for the activity type, the "features" object contains the "isSegmentingEnabled" field with a value equal to true.
{
"apiVersion": 1,
"method": "init",
"attributeDescription": {
"pid": {
"entity": "ENTITY_PROVIDER",
"fieldType": "field",
"gui": "text",
"label": "pid",
"title": "ID",
"type": "string",
"access": "READ_ONLY"
},
"pname": {
"entity": "ENTITY_PROVIDER",
"fieldType": "field",
"gui": "text",
"label": "pname",
"title": "Name",
"type": "string",
"access": "READ_ONLY"
},
"invtype": {
"entity": "ENTITY_INVENTORY",
"enum": {
"NT": {
"label": "NT",
"text": "Internet"
},
"DT": {
"label": "DT",
"text": "Digital Telephony"
},
"AT": {
"label": "AT",
"text": "Analog Telephony"
}
},
"fieldType": "field",
"gui": "combobox",
"label": "invtype",
"title": "Inventory Type",
"type": "enum",
"access": "READ_WRITE"
},
"invpool": {
"entity": "ENTITY_INVENTORY",
"fieldType": "field",
"gui": "text",
"label": "invpool",
"title": "Inventory pool",
"type": "string",
"access": "READ_WRITE"
},
"invsn": {
"entity": "ENTITY_INVENTORY",
"fieldType": "field",
"gui": "text",
"label": "invsn",
"title": "Serial Number",
"type": "string",
"access": "READ_WRITE"
},
"aid": {
"entity": "ENTITY_ACTIVITY",
"fieldType": "field",
"gui": "text",
"label": "aid",
"title": "Activity ID",
"type": "string",
"access": "READ_ONLY"
},
"aworktype": {
"entity": "ENTITY_ACTIVITY",
"enum": {
"27": {
"label": "27",
"text": "Multi-type Unwired Installs"
},
"55": {
"label": "55",
"text": "Maintenance"
},
"WH": {
"label": "WH",
"text": "Warehouse Activity"
},
"installation": {
"label": "installation",
"text": "Installation"
},
},
"fieldType": "field",
"groups": [
{
"label": "task",
"text": "Task",
"items": [
"55"
]
},
{
"label": "teamwork",
"text": "Teamwork",
"items": [
"teamwork_type"
]
},
{
"label": "internal",
"text": "Internal",
"items": [
"WH"
]
},
{
"label": "customer",
"text": "Customer",
"items": [
"27",
"installation"
]
}
],
"gui": "grouped-combobox",
"label": "aworktype",
"title": "Activity type",
"type": "enum",
"access": "READ_ONLY"
},
"no_ports": {
"entity": "ENTITY_ACTIVITY",
"fieldType": "property",
"gui": "text",
"label": "no_ports",
"title": "# Ports",
"type": "int",
"access": "READ_WRITE"
},
"CANCEL_REASON": {
"entity": "ENTITY_ACTIVITY",
"enum": {
"1": {
"text": "M1 REQUESTED BY ISP"
},
"2": {
"text": "M2 PC INADEQUATE"
},
"3": {
"text": "M8 - TAP CHANGEOUT REQUIRED"
},
"4": {
"text": "SS - STORM SERVICE CALL FOLLOW-UP"
},
"5": {
"text": "W1 - JUST BROWSING AT THIS TIME"
}
},
"fieldType": "property",
"gui": "combobox",
"label": "CANCEL_REASON",
"title": "Cancellation Reason",
"type": "enum",
"access": "READ_WRITE"
}
}
}
Activity type features in "init" message
The "attributeDescription" field of "init" message contains "features" object inside enum items of the "aworktype" (activity type) property. If the "Enable segmenting and extended duration" option is enabled for the activity type, the "features" object contains "isSegmentingEnabled" with value equal to true.
locale field
You can send the locale field through the Plugin API within the init message; the field belongs to the user collection. You can use it to apply the language selected in the Oracle Fusion Field Service UI to the plugin.
Example of "init" message
{
"apiVersion": 1,
"method": "init",
"attributeDescription": {
"WO_COMMENTS": {
"fieldType": "property",
"entity": "ENTITY_ACTIVITY",
"gui": "text",
"label": "WO_COMMENTS",
"title": "WO Comments",
"type": "string",
"access": "READ_WRITE",
"lines": 4
},
"aworktype": {
"fieldType": "field",
"entity": "ENTITY_ACTIVITY",
"gui": "grouped-combobox",
"label": "aworktype",
"title": "Activity type",
"type": "enum",
"access": "READ_WRITE",
"enum": {
"5": {
"label": "5",
"text": "Inv Pick up",
"features": {}
},
"VH": {
"label": "VH",
"text": "Vehicle Maintenance",
"features": {}
},
"Multiday": {
"label": "Multiday",
"text": "Multi-day activities",
"features": {
"isSegmentingEnabled": true
}
},
},
"groups": [
{
"label": "internal",
"text": "Internal",
"items": [
"VH"
]
},
{
"label": "customer",
"text": "Customer",
"items": [
"5",
"Multiday"
]
}
]
}
},
"buttons": [
{
"buttonId": "20348",
"params": {}
}
]
"user": {
"languageCode": "en",
"locale": "en-US"
}
}