Update ServiceNow Tickets in CD Stages

Updated 2 days ago by Rashmi Nanda Sahoo

Currently, this feature is behind the Feature Flag SERVICENOW_CREATE_UPDATE_NG. Contact Harness Support to enable the feature.

Harness provides the ability to update ServiceNow change requests and incident tickets from your Pipeline step using the ServiceNow Update step.

You can add the Create ServiceNow step to a Harness CD stage or an Approval stage and do the following:

  • Automatically update change requests in ServiceNow to track updates to your build, test, and production environments by adding a ServiceNow Create step in your Pipeline.
  • Automatically assign tickets in ServiceNow to triage and resolve incidents quickly in case of Pipeline failures.

Before You Begin

  • Connect to ServiceNow: you can add a Harness ServiceNow Connector before or during the Create ServiceNow step setup.
  • You must install the Harness Application before using templates to updates ServiceNow tickets.​​
  • Make sure you have the following roles:
    • x_harne_harness_ap.integration_user_role​​
    • itil​​
  • Adding ServiceNow Approval Stages and Steps

Review: ServiceNow User Roles

You can install the Harness app in your ServiceNow instance from the ServiceNow store. For more information, see Installation Guide.

To configure the Harness app in ServiceNow, you must have the following roles:​

  • x_harne_harness_ap.integration_user_role​​​: to access supported APIs, view Harness support details and access Templates.
  • itil​: for end-to-end integration with Harness platform.

Step 1: Add a ServiceNow Update Step

In a Harness CD or Approval stage, in Execution, click Add Step.

Click ServiceNow Update. The ServiceNow Update settings appear.

In Name, enter a name that describes the step.

In Timeout, enter how long you want Harness to try to update the issue before failing (and initiating the stage or step Failure Strategy).

In ServiceNow Connector, create or select the ServiceNow Connector to use.

In Ticket Type, select a ServiceNow ticket type from the list.

In Ticket Number enter the ServiceNow ticket number to update. You can enter fixed values, provide runtime input, or provide an expression for this field.

Option: Update Fields

Select Update Fields to update specific ServiceNow Fields in your ServiceNow ticket. This option enables you to access multiple custom fields from your ServiceNow integration.

In Description, enter a detailed description of the ticket.

In Short Description, enter a summary of the ticket you are creating. This will be the title of the ticket.

You can use Harness variables in the Short Description and Description fields.

Click Fields. The Add ServiceNow Fields settings appear.

You can specify additional fields for the ticket by clicking Provide Field List. The properties are specified as key-value pairs, the name being the field name (not the label) in ServiceNow and a valid value.

Option: Apply From Template

Select Apply From Template to update a ticket using an existing template.

In Template Name, enter the name of an existing template or provide an expression.

All the fields corresponding to the Template are listed.

Click Apply Changes.

See Also


Please Provide Feedback