Support of Forms
A new Core API Event with type 'formSubmitted' is generated when a form is submitted. This event contains information about the form values and the entity values that are submitted with the form.
Subscription
An integrated external system can subscribe for the formSubmitted event and receive all the submitted data of forms using the Create Subscription operation of the Event API.
A subscriber can use the filterExpression option to specify which form or forms are needed for the particular subscription by checking form labels.
Example:
"filterExpression" : "formIdentifier.formLabel in ['form1', 'form3']"
"filterExpression" : "formIdentifier.formLabel = 'form2'"
The monitorChanges parameter (if specified) does not influence the behavior and is ignored. You cannot change the snapshot of data generated when a form is submitted. The 'fields' parameter cannot be used. The formSubmitted event contains all the information that was submitted.
Retrieve Events
When a form is submitted in Oracle Field Service, it is registered as a formSubmitted event and the subscribers can subscribe to the event through the GET Events operation.
The event contain the following attributes:
- eventType: The type of the event. For example, the value 'formSubmitted' is used for the event when the form is submitted.
- formSubmitId: The unique ID generated when a form is submitted.
- formLabel: The label of the form.
- time: The datetime in UTC when the form was submitted. For example, 2016-04-25 12:36:11.
- user: The username of the user who submitted the form.
- formDetails: The record that contains the submitted form field values. This field is optional.
- activityDetails: The record that
contains the submitted activity field values. This field is optional.
Note that the activity fields that display time values (e.g., "startTime", "endTime) are submitted in the format as they were present on the screen, the time format is configured for the user who submitted the form.
- inventoryDetails: The record that contains the submitted inventory field values. This field is optional.
- resourceDetails: The record that contains the submitted resource field values. This field is optional.
- requestDetails: The record that contains the submitted service request field values. This field is optional.
File Content Access
During form submission, the files can be recorded, and you can use the URL provided within the event body to access the content of files. The URL itself does not represent a standalone API operation and should be used as it is provided.
API Integration for Service Request Objects
The FormSubmitted event maintains backward compatibility with the service request operations. If a control in the submitted form is associated to a service request field, then a service request event is created to provide backward compatibility.
Also, the message scenario flow configured with the 'Manual' launch condition is also triggered.
formSubmitted Event Example
{
"eventType": "formSubmitted",
"time": "2018-11-22 13:13:55",
"user": "login",
"formIdentifier": {
"formSubmitId": "19",
"formLabel": "form432_invoice"
},
"activityDetails": {
"activityId": 4225430,
"apptNumber": "appt_255_000_v1",
"customerName": "John Doe",
"startTime": "01:50 AM",
"endTime": "02:15 AM",
"House or Door photo": {
"filename": "Console.jpg, 26K",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/forms/19/activityFiles/House+or+Door+photo"
}
},
"formDetails": {
"some_form_element1": "value",
"some_form_element2": "value",
"form_signature_element": {
"filename": "image.jpg, 26K",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/forms/19/files/form_signature_element"
}
}
}