Create Self-Service Incidents

Safety of employees is a top priority for most organizations. To reduce safety problems, risks, and costs, organizations often need to report environment and health and safety incidents in a timely way. They may also have to report incidents because of local, regional, or national laws.. You can use the incidentKiosks resource to create incidents reported in your organization and retrieve reported incidents. Let's discuss this scenario briefly.

Here's a typical application processing flow for the scenario:

  1. An employee in your organization reports the occurrence of an incident using a software application.

    or

    An IoT device records the occurrence of an incident.

  2. The application or service makes a REST service call to create the incident details in Oracle HCM Cloud and returns appropriate data.

For example, Andy, who was wearing an Internet of Things (IoT) device, entered a restricted area. The device recorded the incident in the application that manages the IoT device. Brian, a security manager, reviewed the event and decided to escalate the incident for further investigation. He selected the incident to create an environment and health and safety incident. The incident, along with the event, appears as a new incident under Workforce Health and Security incidents in the Oracle HCM Cloud UI.

To create an incident:

  1. Perform a POST operation on the incidentKiosks resource by providing the incident summary and description and incident event type in the request body.
  2. Query the incident by using a query parameter such as the newly created incident ID (for example, /incidentKiosks/<incidentId>) and retrieve (GET) the complete data set.

Example URL

Use this resource URL format.

POST

/hcmRestApi/resources/11.13.18.05/incidentKiosks

Example Request

Here's an example of the request body in JSON format.

{
  "IncidentDate": "2018-06-26 13:49:55.482",
  "IncidentSummary": "TEST Rest API 3",
  "LocationTypeCode": "ORA_ON_SITE",
  "ReptrSpecificLocation": "Specific Location",
  "ReporterTypeCode": "ORA_EMPLOYEE",
  "EmployeeId" : "100000008153756",
  "LocationId": "2510",
  "IncidentTypeCode": "ORA_HEALTH_AND_SAFETY_INC",
  "SeverityLevelCode": "ORA_NO_EFFECT",
  "NotifiedPersonId": null,
  "IncidentReportedDate": "2020-01-15T11:07:07.248+00:00",
  "IncidentSourceCode" : "ORA_INTERNAL",
  "IncidentDetailKiosk" : [
      {
        "IncidentEventCode" : "ORA_VEHICLE_INCIDENT"
      },
      {
        "IncidentEventCode" : "ORA_NEAR_MISS"
      }
  ]
}

Example Response

Here's an example of the response body in JSON format.

{
    "EmployeeId": 100000008153756,
    "IncidentDate": "2018-06-26T13:49:55.482+00:00",
    "IncidentId": 300100191425589,
    "IncidentSummary": "TEST Rest API 3",
    "LocationTypeCode": "ORA_ON_SITE",
    "ReporterTypeCode": "ORA_EMPLOYEE",
    "ReptrCity": null,
    "ReptrCountry": null,
    "ReptrEmail": null,
    "ReptrAddrLine1": null,
    "ReptrName": null,
    "ReptrPhoneNo": null,
    "ReptrSpecificLocation": "Specific Location",
    "TargetCompletionDate": "2020-07-21T18:11:08.478+00:00",
    "ReptrAddrLine2": null,
    "ReptrZipCode": null,
    "ReptrState": null,
    "LocationId": 2510,
    "ReptrCountryCodeNum": null,
    "ReptrAreaCode": null,
    "IncidentSourceCode": "ORA_INTERNAL",
    "IncidentTypeCode": "ORA_HEALTH_AND_SAFETY_INC",
    "SeverityLevelCode": "ORA_NO_EFFECT",
    "NotifiedPersonId": null,
    "IncidentReportedDate": "2020-01-15T11:07:07.248+00:00",
    "IncidentDetailKiosk": [
        {
            "IncidentEventCode": "ORA_VEHICLE_INCIDENT",
            "IncidentDetailId": 300100191425590,
            "IncidentEventDate": "2018-06-26T13:49:55.482+00:00",
            "IncidentEventSummary": "TEST Rest API 3",
            "links": [
                {...
                    }
             ]
        },
        {
            "IncidentEventCode": "ORA_NEAR_MISS",
            "IncidentDetailId": 300100191425591,
            "IncidentEventDate": "2018-06-26T13:49:55.482+00:00",
            "IncidentEventSummary": "TEST Rest API 3",
            "links": [
                {
                  ...}
             ]
}