Manage ServiceNow Incidents

Use these recipes to create, update, or delete incidents in ServiceNow.

Note:

These recipes are available in the REST — ServiceNow | Manage Incidents package in the Integration Store. Oracle provides these recipes as samples only. These recipes are meant only for guidance, and are not warranted to be error-free. No support is provided for these recipes.

Overview

Using the recipes in the REST — ServiceNow | Manage Incidents package, you can:

  • Create an Incident in ServiceNow
  • Update an Incident in ServiceNow
  • Delete an Incident in ServiceNow

To run the ServiceNow recipes, you must configure the Oracle ServiceNow Connection with the details necessary to access ServiceNow. You can then trigger the integrations through a REST request and specify the request parameters. This invokes the ServiceNow adapter to create, update or delete an incident in ServiceNow, as specified in the request.

  • For Oracle REST ServiceNow Create Incident, trigger the integration with the REST request and specify incidentdescription as request parameter in the payload. The ServiceNow adapter is subsequently invoked and it creates an incident in ServiceNow. The response containing the incident number and the incident Id is returned to you.
  • For Oracle REST ServiceNow Update Incident, trigger the integration with the REST request and specify incidentId, incidentState, and incidentUrgency as request parameters in the payload. The ServiceNow adapter is subsequently invoked and it updates the incident details in ServiceNow.
  • For Oracle REST ServiceNow Delete Incident, trigger the integration with the REST request and specify incidentId as request parameter in the payload. The ServiceNow adapter is subsequently invoked and it deletes the incident details in ServiceNow.
Integration Name Description REST Commands and Example Payloads
Oracle REST ServiceNow Create Incident Creates an incident in the ServiceNow instance.

REST API Command:

POST: https://<host:port>/ic/api/integration/v1/flows/rest/ORCL-R-REST_SERVIC_CREATE_INCIDE/1.0/create

Example Request Payload:

{ "incidentdescription" : "Employee phone number missing" }

Example Response Payload:

{
    "serviceNowNr": "INC0010031",
    "serviceNowSysId": "fe6a74e62f503010f129811df699b6e7"
}
Oracle REST ServiceNow Update Incident Updates an incident in the ServiceNow instance.

REST API Command:

POST: https://<host:port>/ic/api/integration/v1/flows/rest/ORCL-R-REST_SERVIC_UPDATE_INCIDE/1.0/update

Example Request Payload:

{"incidentId":"bec4ce452f603010f129811df699b6cc","incidentState":"2","incidentUrgency":"2"}

Note the valid values of request parameters incidentState and incidentUrgency:

incidentState
  • 1 = New
  • 2 = In Progress
  • 3 = On Hold
  • 6 = Resolved
  • 7 = Closed
  • 8 = Canceled
incidentUrgency
  • 1 = High
  • 2 = Medium
  • 3 = Low

Example Response Payload:


{
    "incidentStatus": "bec4ce452f603010f129811df699b6cc"
}
Oracle REST ServiceNow Delete Incident Deletes an incident in the ServiceNow instance.

REST API Command:

POST: https://<host:port>/ic/api/integration/v1/flows/rest/ORCL-R-REST_SERVIC_DELETE_INCIDE/1.0/delete

Example Request Payload:

{"incidentId":"fe6a74e62f503010f129811df699b6e7"}

Response Payload:

{
    "status": "1"
}

System and Access Requirements

  • Oracle Integration
  • ServiceNow

Install, Configure, and Run the Recipes

For more information and steps to install, configure, and run recipes, see Get Started with Integration Accelerators and Recipes.

To use the recipes in the REST — ServiceNow | Manage Incidents package, you must configure the Oracle REST Connection and the Oracle ServiceNow Connection. You only need to configure these connections once. All the recipes in the package use the same connections.

Connection Name Parameters
Oracle REST Connection The connection details are already configured for you. Test and save the connection.
Oracle ServiceNow Connection
Connection Properties
  • ServiceNow Instance Name: Enter the ServiceNow instance URL.
Security
  • Security Policy: By default, only the Basic Authentication policy is supported.
  • Username: Enter the username to connect to your ServiceNow instance.
  • Password: Enter the password to connect to your ServiceNow instance.

For more details, see Create a ServiceNow Adapter Connection in Using the ServiceNow Adapter with Oracle Integration.