createServiceNowIncident

A Workflow Engine function that sends an incident to create request to ServiceNow.

This function is available as a feature of the Add-ons v2.3 download and later.

This function is available for alert and Situation workflows.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function createServiceNowIncident has no arguments.

The setSerivceNowPayload function must run before this function in the workflow to set the payload for the request.

Example

The following example demonstrates typical use of Workflow Engine function createServiceNowIncident.

In this case, the the workflow creates a new incident in the target ServiceNow system using the defined payload, createAlertTicket, when a new Situation is raised or the Situation client tool, Open ServiceNow Ticket, has run.

Sample Workflow - Create ServiceNow Incident (Situation Integration WFE)

Action

Description

Entry filter

'custom_info.inc' = null

DELAY

5 seconds (set as needed)

Set ticket payload and target

(setServiceNowPayload)

Build request payload and save to workflowContext

instance: $(workflowContext.passedInstance)

requestType: create

payloadTemplate: $(workflowContext.passedPayloadTemplate)

Create Ticket

(createServiceNowIncident)

Send create request using workflowContext from previous action

The workflow takes input values from workflowContext (set in the corresponding workflow in the Situation Workflows WFE, which initiates this request) and, in this case, issues a request to ServiceNow to create a new incident.

Note

A similar function is provided for alerts in the Alert Workflows and Alert Integration WFE and can be initiated on alert creation.