1. Home
  2. Integrations
  3. ServiceNow Integration Guide

ServiceNow Integration Guide

VictorOps to ServiceNow Integration

No need to interrupt workflows in order to update tickets. The latest VictorOps to ServiceNow integration allows you to spend more time working on incidents and less time moving a ticket through the queue. This way, you can quickly respond to an incident, collaborate in real-time and find resolutions faster.

The VictorOps to ServiceNow integration maintains all of your incident and ticket history but doesn’t distract you during a firefight. Then, you can leverage this detailed incident history to conduct thorough post-incident reviews and ensure on-call incident management gets better over time. Eliminate context-switching by working in a single application, focusing on the issue at hand and spending less time organizing tickets.

Automatically Update ServiceNow Tickets from VictorOps

  • Combine real-time incident response functionality with detailed ticket tracking to create a holistic system for on-call incident management
  • Focus on real-time response and collaboration during a firefight and reduce MTTA/MTTR over time by automatically updating ServiceNow tickets from VictorOps
  • Centralize monitoring data, on-call schedules and alerting to improve visibility into infrastructure health and easily keep cross-functional teams informed during incident response
  • Conduct thorough post-incident reviews with complete records of incident history sent from VictorOps to ServiceNow

ServiceNow Versions Supported:

Istanbul, Jakarta, Kingston, London, Madrid

  • ServiceNow Account: Requires SNOW Administrative Privileges to create the application registry and an Active, “Web Service Access” only user
  • VictorOps Version Required: Full Stack level of Service
  • Need to Know: Currently manual incident creation in VictorOps will not send to SNOW

Enable VictorOps In ServiceNow

Create Application Registry

As an admin, navigate to System OAuth >> Application Registry and select New.

Create application registry in SNOW for VictorOps

Click Create an OAuth API endpoint for external clients

Create an OAuth API endpoint for external clients

Fill in the required fields:

  • Name: VictorOps
  • Client ID: defined automatically
  • Client Secret: Create your own or leave blank to have a secret generated for you upon saving.

Click Save.

VictorOps fields in Service Now integration

Create a User

Create or select an active user with Web service access only. This user will serve as the conduit for the integration between VictorOps and ServiceNow incidents.

create a user in servicenow - victorops

Create Roles for User

Once you’ve created a User you’ll want to assign that User three specific roles with ServiceNow. From the Roles Collection, select itil, itil_admin, and personalize_choice.

create roles for a user in servicenow - victorops

To do this please select the User in question, and then select the edit button from the Roles tab as depicted below.

select edit on user roles tab

From the Roles Collection, select itil, itil_admin, (these let VictorOps update tickets after ServiceNow ingestion) and “personalize_choice” lets us get the list of ServiceNow ticket states for State Mappings.

creating victorops instance in servicenow

Enable ServiceNow In VictorOps

As an admin, navigate to Settings >> Alert Behavior >> Integrations >> ServiceNow (Enterprise Suites).

select servicenow in victorops

Click Enable Integration

enable servicenow in victorops

Referring to the details of your System OAuth Application Registry previously created in ServiceNow, copy and paste the details into the respective fields in VictorOps. Your Host is found as the sub-domain in your SNOW URL bar:

Your Host is found as the sub-domain in your SNOW URL bar

The integration also requires a client username and password. If there is not one available, create one using the ServiceNow user section. If the user will only be used for integration purposes, the user can be marked as non-interactive in the user account record.

connect to servicenow

Click Connect to ServiceNow.

Incident State Mapping

To update VictorOps incident states and conditions within ServiceNow, select the Edit Integration. Here you may also reconfigure your ServiceNow Connection Details.

Incident State Mapping - SNOW VictorOps

Mapping ServiceNow Assignment Groups

Upon validating credentials, you should now be able to map VictorOps Escalation Policies to ServiceNow Assignment Groups.

Mapping ServiceNow assignment groups

Select Add Mapping to see available choices.

Add mapping to see available choices

When the mapping is set, the ServiceNow Assignment Group field will be updated based on the Escalation Policy being paged. This field will also update when an incident is rerouted to another Escalation Policy. If the incident reroutes to a specific user, the assignment group will be cleared.

User Mapping

Upon clicking save on the edit integration page, all available users will be synced across the systems. If the integration is enabled, when a user takes an action and there is available mapping, the user will be synced.

Transmogrifier

Next, navigate to Settings >> Alert Behavior >> Transmogrifier. Two alert rules will need to be created to complete the integration.

First, add a rule which defines a matching condition on which to send VictorOps incidents to ServiceNow. For example, to send all critical incidents to ServiceNow, use “when message_type matches CRITICAL then transform ServiceNow_Integration to true“. If an incident in ServiceNow has mandatory fields, these fields must also be added in this rule with the syntax ‘transform ServiceNowCustomField_<field_name> to ${{victorops_field_name}}‘. For ServiceNow field name syntax, see below.

Last, create a rule for when monitoring_tool matches ServiceNow then transform ServiceNow_Integration to false. This rule prevents infinite loops between VictorOps incidents and ServiceNow incidents — this is required if the ServiceNow (legacy) integration is enabled.

Transmogrifier rules in VictorOps ServiceNow

Supplemental Field Syntax

When passing additional fields to ServiceNow from VictorOps beyond what is included out of the box (perhaps for a mandatory field) a special syntax must be employed using the Transmogrifier. For each field, the underlying field name first needs to be determined within ServiceNow.

In the Transmogrifier, these fields are referenced as ServiceNowField_<field_name> and may be assigned any desired value. See field expansion for more tips on dynamic assignment.

Updating “Assigned To” Field

The Assigned To field in ServiceNow will be populated with the first user to acknowledge an incident. If the incident goes back to triggered, the next person to acknowledge will populate the incident.

Updating Assigned To field in ServiceNow

Incident Linking

You can click through to the incident in ServiceNow from the incident pane in VictorOps.

Incident Linking in Servicenow

 

ServiceNow to VictorOps Integration

This integration allows VictorOps users to track tickets and maintain accurate incident history in ServiceNow.

The ServiceNow to VictorOps integration is delivered as a ServiceNow update set in a single XML file. It allows the creation of incidents on the VictorOps platform based on creation or update of Task items in ServiceNow. It also can be configured for limited feedback to ServiceNow when incidents are acknowledged or resolved on the VictorOps platform.

The VictorOps integration creates a new kind of Task called “VictorOps Incident” that is explicitly for creating incidents on the VictorOps platform. It is also possible to enable the “out of the box” ServiceNow Problem and Incident Tasks to create incidents on the VictorOps platform. All three of these actions are enabled using Business Rules.

Please contact support to get the required XML file: victorops-support@splunk.com

Requirements

Versions Supported: Madrid, and earlier versions.

VictorOps Version Required: Enterprise

Note: The current integration is supported for the Jakarta (July 2017) release and previous versions.


Activate ServiceNow In VictorOps

Before you begin, collect your organization ID and Service API key from integrations pages of the VictorOps platform. There is currently no single page (UI) where you can see both of these values. To get the key, go to the Service Now Integration Page.collect your organization ID and Service API key from integrations pages

Select ServiceNow integration and hit the enable button.

Select ServiceNow integration

Once the ServiceNow integration is enabled, the Service API Key will be revealed. Please copy

Copy Service API Key

To get the organization ID, you will need the slugified version of your organization name (org slug).  When you are logged into the main VictorOps timeline, your org slug is located at the end of the URL.  (Ex. if the URL is https://portal.victorops.com/client/my-company, then the org slug, in this case, is “my-company”)

get org slug

(If you are running into issues locating your organization ID please contact support by selecting the link in the upper right-hand corner, or by emailing support@victorops.com)


Linking VictorOps In ServiceNow

In the ServiceNow administration interface, under System Update Sets go to Retrieved Update Sets and click Import Update Set from XML.

click Import Update Set from XML

Upload the VictorOps integration XML (To get the latest version of the XML file please contact support by selecting the link in the upper right-hand corner, or by emailing support@victorops.com.)

Upload the VictorOps integration XML

Click on VictorOps Integration and then Preview Update Set:

Click on VictorOps Integration and then Preview Update Set

Preview Update Set:

Preview Update Set

That should preview without errors. Then, click Commit Update Set:

click Commit Update Set

 


Configuration Steps

Once committed, a new VictorOps menu will appear on the left. To configure, click VictorOps > Settings. Enter your organization ID and REST API key that you retrieved from the VictorOps portal, then click Save:

SNOW to VO Configuration Steps


Test a VictorOps Incident

To test that this configuration is working, click New VictorOps Incident, make sure the Priority is set to Critical, provide values in the Short Description and Description fields, and click Submit:

Test a VictorOps incident in SNOW

As you can see below, an incident is created on the VictorOps platform:

an incident is created on the VictorOps platform

You may resolve this incident within ServiceNow by clicking Open VictorOps Incidents, then select the incident in questions from the available list (not shown). Change the state of the incident from Open to Closed Complete and select Update:

resolve this incident within ServiceNow

You will now see the incident resolved on the VictorOps platform:

see the incident resolve on the VictorOps platform


Additional/Optional Configuration

Sending ServiceNow incidents and problems to VictorOps:

By default, VictorOps Incidents are sent to the VictorOps platform, but ServiceNow Incident and Problem tasks are not. The VictorOps integration does, however, include deactivated Business Rules to enable that functionality. If you choose, you may enable them by clicking Business Rules under the VictorOps menu, and setting the active status of the VictorOps ServiceNow Incident and/or VictorOps ServiceNow Problem rules to true:

Sending ServiceNow incidents and problems to VictorOps

Configuring ServiceNow groups to VictorOps routing key mappings:

You may affect how incidents are routed on the VictorOps platform by configuring routing keys. To do so, you may create a mapping between ServiceNow groups and VictorOps routing keys. Under the VictorOps menu, click “VictorOps Group Routings”. Click “New”, then select a user group and routing key:

Configuring ServiceNow groups to VictorOps routing key mappings:

 

Select a ServiceNow user group and VictorOps routing key from the pop-up windows. It is also possible to create a new VictorOps routing key on the fly from that window by clicking New:

Select a ServiceNow user group and VictorOps routing key

 

Click Submit when finished.

click submit SNOW to VictorOps

 

In this example, any ServiceNow Task assigned to the “Database” user group will be sent to VictorOps with the “devops” routing key. More information about how VictorOps uses routing keys can be found here: Incident Routing

Please Note: At this time, rerouting an incident within VictorOps by updating the assigned group for the ServiceNow task is not supported. Also, routing to a specific individual within VictorOps is not supported, unless that individual is the only person on the team to which the routing key is assigned in VictorOps.

Enabling “Ack-Back”

The VictorOps Ack-Back feature allows acknowledgment and resolution of incidents on the VictorOps platform to update the state of the corresponding ServiceNow Task row.

To enable Ack-Back, a scheduled job must be created. Under the VictorOps menu, click “Scheduled Jobs”, then “New”, and in the Automation Creator, select “Automatically run a script of your choosing”.

Then configure the new job with the name “VictorOps Command Poll”, run schedule of “Periodically”, an interval of 5 minutes, and paste the following script code into the script box:

1
(new VictorOpsHelper()).pollForCommands();

When done, it will look something like the following:

Enable Ack Back in ServiceNow

When incidents are acknowledged on the VictorOps platform, the corresponding ServiceNow Task state will be updated with an appropriate corresponding state:

ServiceNow Task state updated with an appropriate corresponding state

 

Advanced Configuration

ServiceNow Problem and ServiceNow Incident tickets are being created with a priority field, which is mapped to a severity level of INFO, WARNING or CRITICAL when sent to VictorOps. The severity affects whether or not incidents are created and escalations run on the VictorOps platform.

By default, ServiceNow Problems created with Critical or High priority map to CRITICAL, Moderate maps to WARNING, and Info/Planning map to INFO:

change config behavior for SNOW to Victorops

Thus, for example, a Problem created with Moderate priority will not create a VictorOps incident. To change that behavior, you may either:

  • Enable incident creation on warning in the VictorOp admin interface as usual
  • Modify the business rule to treat “moderate” priority as “critical” in VictorOps

To do the latter, Open the “VictorOps ServiceNow Problem” business rule, and edit the rule script to add priority ‘3’ to the critical priority list:

Modify the business rule to treat "moderate" priority as "critical" in VictorOps

 

If you so desire, the mapping of Info/Planning priorities can also be changed in the same business rule script. To have them handled as CRITICAL:

1
2
// openStates, ackStates, criticalPriorities, warningPriorities
(new VictorOpsHelper([1],[2,3],[1,2,3,4,5],[])).notify(current);

To handle them as WARNING:

1
2
// openStates, ackStates, criticalPriorities, warningPriorities
(new VictorOpsHelper([1],[2,3],[1,2,3],[4,5])).notify(current);

ServiceNow Incidents are handled in a similar way.

ServiceNow Express Integration Guide

ServiceNow Express gives many smaller IT teams and businesses a cost-effective alternative to the standard ServiceNow service. With the VictorOps and ServiceNow Express integration in action, you can organize requests from across the organization and rapidly collaborate and respond to incidents. Combine the power of VictorOps and ServiceNow Express to provide a single source of truth for incident visibility, detailed ticket tracking, alert automation and human communication.

Collaborative incident response meets real-time ticket management

  • Set on-call schedules, alert rules and escalations in VictorOps
  • Make changes to tickets in ServiceNow Express and automatically update incident details in VictorOps
  • Centralize monitoring, collaboration and incident tracking in one timeline to improve overall visibility for IT and DevOps teams
  • Shorten MTTA/MTTR by taking ServiceNow Express tickets and pushing them to VictorOps in order to collaborate in a real-time alerting and communication tool
Requirements

Versions Supported: Istanbul

VictorOps Version Required: Full-Stack

What you need to know: The contents of the Payload is highly configurable, if you have any questions regarding customization, please contact support.

Activate ServiceNow Express In VictorOps

From the main timeline select Settings >> Alert Behavior >> Integrations

Select the ServiceNow Express integration option.

 

Select the ServiceNow Express integration option. And then copy the full URL path to your clipboard.

copy ServiceNow Express URL to clipboard

Enable VictorOps In ServiceNow Express

REST Messages

From the left sidebar under Application Configuration select Web Services then REST Messages

select Web Services then REST Messages

 

Create a new REST Message

Create a new REST Message

 

Give the REST message a name and description then paste in the VictorOps endpoint you copied from the VictorOps web portal.

Give the REST message a name and description

 

Under HTTP Methods you will create two new methods, one for critical VictorOps alerts and one for recovery alerts. To start select New in the HTTP Methods section.

Give the method a name such as “VictorOps Critical”, select POST for the HTTP method, and paste in the Legacy REST endpoint URL you copied from VictorOps into the “Endpoint” field.

In the “Content” section past in the following code snippet.

{
"message_type":"critical",
"entity_id":"${number}",
"state_message":"${short_description}",
"monitoring_tool":"ServiceNow Express",
"caller":"${caller}",
"category":"${category}",
"subcategory":"${subcategory}",
"state":"${state}",
"impact":"${impact}",
"urgency":"${urgency}",
"priority":"${priority}",
"assigment_group":"${assignment_group}",
"assigned_to":"${assigned_to}"
}

Hit update to save the settings.

paste in the Legacy REST endpoint URL you copied from VictorOps into the "Endpoint" field.

Next we will make the Recovery HTTP method.

make recovery HTTP method

Give the method a name such as “VictorOps Recovery”, select POST for the HTTP method, and paste in the Legacy REST endpoint URL you copied from VictorOps into the “Endpoint” field.

In the “Content” section past in the following code snippet.

{
"message_type":"recovery",
"entity_id":"${number}",
"state_message":"${short_description}",
"monitoring_tool":"ServiceNow Express",
"caller":"${caller}",
"category":"${category}",
"subcategory":"${subcategory}",
"state":"${state}",
"impact":"${impact}",
"urgency":"${urgency}",
"priority":"${priority}",
"assigment_group":"${assignment_group}",
"assigned_to":"${assigned_to}"
}

Hit update to update settings.

update to save endpoint settings

 

Creating Business Rules

Next you will need to create two business rules, one for each of the REST messages you created in the previous section. Under Web Services in the left sidebar select Business Rules.

create business rules in VictorOps

 

Create a new Business Rule.

create new VictorOps business rule

Give the rule a name such as “VictorOps Critical” and set the table value to Incident. Make sure that both the Active and Web Services boxes are selected.

Select the When to run tab and put in the specific filter conditions for when you want incidents sent to VictorOps. In the example below we have set it so that on Insert of an incident when the Incident’s state is New then take action.

put in the specific filter conditions for when you want incidents sent to VictorOps

 

Next select the Web Services tab. Select the VictorOps REST Service and the VictorOps Critical Rest Method. For the variable substitutions set each field to be Same as and then the corresponding field name as you see in the following example. Once all the variable substitutions are set select Update.

Select the VictorOps REST Service and the VictorOps Critical Rest Method

 

Now you will need to create a rule for the recovery messages. First create a new business rule.

create a rule for the recovery messages

Give the rule a name such as “VictorOps Recovery” and set the table value to Incident. Make sure that both the Active and Web Services boxes are selected.

Select the When to run tab and put in the specific filter conditions for when you want incidents sent to VictorOps. In the example below we have set it so that on Update of an incident when the Incident’s state is Resolved or Closed then take action.

put in the specific filter conditions for when you want incidents sent to VictorOps.

 

Next select the Web Services tab. Select the VictorOps REST Service and the VictorOps Recovery Rest Method. For the variable substitutions set each field to be Same as and then the corresponding field name as you see in the following example. Once all the variable substitutions are set select Update.

Select the VictorOps REST Service and the VictorOps Recovery Rest Method.

That’s it! To test the integration you can either open up a new incident or select the test option underneath the HTTP Method settings here.

Test ServiceNow Express integration in VictorOps

If you have any questions please contact VictorOps support.

Updated on June 7, 2019

Was this article helpful?

Related Articles