Skip to main content

ServiceNow Management Workflows

The ServiceNow Management integration installs the following workflows.

Outbound Requests

Workflows which perform outbound requests:

Situation Workflows

Workflow Name

Engine Name

Description

Create ServiceNow Incident

Situation Workflows (initiate)

Situation Integration

Request to create incident using payload set in setServiceNowPayload function.

Resolve ServiceNow Incident

Situation Delta (initiate)

Situation Integration

Request to resolve related incident using payload set in setServiceNowPayload function.

Close ServiceNow Incident

Situation Delta (initiate)

Situation Integration

Request to close related incident using payload set in setServiceNowPayload function.

Assign ServiceNow Incident

Situation Delta (initiate)

Situation Integration

Request to assign related incident when the Situation is owned using the Moogsoft Enterprise UI. Payload is built-in assign function.

Client Assign ServiceNow Incident

Situation Delta (initiate)

Situation Integration

Request to assign related incident when requested through Situation Client Tool. Payload is built-in assign function.

Update ServiceNow Incident

Situation Delta (initiate)

Situation Integration

Update the related ServiceNow incident description when the Situation Description is edited in the UI using the payload set in setServiceNowPayload function.

Add note to ServiceNow Incident

Situation Delta (initiate)

Situation Integration

Request to add work note to related incident when Situation collaboration post made.

The work note content can be prepended with additional text and the Moogsoft Enterprise user name or email as set in the Integration Advanced Settings.

Alert Workflows

Workflow Name

Engine Name

Description

Create ServiceNow Incident

Alert Workflows (initiate)

Alert Integration

Request to create incident using payload set in setServiceNowPayload function.

Resolve ServiceNow Incident

Alert Actions (initiate)

Alert Integration

Request to resolve related incident using payload set in setServiceNowPayload function.

Assign ServiceNow Incident

Alert Actions (initiate)

Alert Integration

Request to assign related incident when the alert is owned using the Moogsoft Enterprise UI. Payload is a built-in assign function.

Client Assign ServiceNow Incident

Alert Integration

Request to assign related incident when requested through Alert Client Tool. Payload is a built-in assign function.

Note

The entry filter for the initiate workflows determine when an incident should be created or updated. You can change these filters to meet your specific needs. It is recommended that you copy the workflow and update the copy rather than use the supplied templates as these can be overridden or reset when the integration configuration is updated.

Inbound Requests

Workflow Name

Engine Name

Description

Handle ServiceNow Response

Situation Integration

Request to process response from ServiceNow.

Usage Examples

Automated Create ServiceNow Incidents

To automatically create ServiceNow Incidents from alerts or Situations, ensure that the appropriate “Create ServiceNow Incident” initiate workflow is copied (optional but recommended) and enabled with the entry filter amended to meet your requirements. For example, in the templates provided, the entry filters are defined as:

For Alerts: entry filter is set to 'custom_info.eventDetails.raiseTicket' = Y

For Situations: entry filter is set to 'custom_info.automationFlags' is one of Y AND 'internal_priority' >= 'Major'

Note

A multithreaded workflow engine (Alert Workflows or Situation Workflow) processes initiating events and passes the request to the integration workflow engine, which is single-threaded. This ensures correct processing.

Create ServiceNow Incident (Situation Workflows)

Action Name

Function

Arguments

Forwarding Behavior

Workflow Definition

Entry Filter

'custom_info.automationFlags' is one of Y AND 'internal_priority' >= 'Major'

NA

Workflow Definition

First Match Only

Checked

NA

3 seconds

Delay

3 seconds

NA

Initiate Create ServiceNow Incident

createIncident

{"serviceName":"servicenowmgmt", "instanceName":"servicenowmanagement1", "templateName":"createSituationTicket", "arguments":{}}

Always forward

Create ServiceNow Incident (Situation Integration)

Action Name

Function

Arguments

Forwarding Behavior

Workflow Definition

Entry Filter

custom_info.inc = null

NA

5 seconds

Delay

5 seconds

NA

Set ticket payload and target

setServiceNowPayload

{"instance":"$(workflowContext.passedInstance)", "requestType":"create", "payloadTemplate":"$(workflowContext.passedPayloadTemplate)"}

Stop This Workflow

Create Ticket

createServiceNowIncident

NA

Always forward

If successful, the Situation custom_info.inc updates with the ServiceNow incident number and correlation info is created to enable subsequent updates (for example: add work notes, assign, resolve, close) as required.

{ 
  "inc":"INC0010065"
}

If the request is unsuccessful, then a message is written to the Situation Collaboration and the moogfarmd log file to indicate the issue. The request to create the incident can be retried after fixing the issue using the Situation Client Tool, ServiceNow Management - Open Ticket.

Manually Create ServiceNow Incidents

The Situation Client Tool ServiceNow Management - Open Ticket lets you create ServiceNow incidents from Situations.

The Alert Client Tool ServiceNow Management - Open Ticket lets you create ServiceNow incidents from Alerts.