No results for ""
EXPAND ALL
  • Home
  • API docs

GIVE DOCS FEEDBACK

Using the ServiceNow approvals integration

Read time: 3 minutes
Last edited: Jan 26, 2024
The ServiceNow approvals integration is an Enterprise feature

The ServiceNow approvals integration is available to customers on an Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.

Overview

This topic explains how to use the ServiceNow approvals integration to request approvals for LaunchDarkly changes in ServiceNow.

Prerequisites

In order to complete this topic, you must meet the following prerequisites.

  • You must have an existing ServiceNow account.
  • You must have completed both parts of the setup for this integration. To learn more, read Setting up the ServiceNow approvals integrations.

Requesting approval for flag changes in ServiceNow

To request approval for flag changes in ServiceNow, you must request approval for the change in LaunchDarkly.

To request approval in LaunchDarkly:

  1. In LaunchDarkly, navigate to the feature flag that you wish to change and make your needed changes to the flag targeting, status, or variations.
  2. Click the dropdown icon in the Review and save button:
The "Request approval" option below the "Review and save" button.
The "Request approval" option below the "Review and save" button.
  1. Select Request approval. A dialog appears.
  2. Enter the description and any scheduling details, if desired.
  3. Click Request Approval. This creates a change request with state "New" in your ServiceNow instance.
  4. The approvers for feature flag changes receive a notification.

Viewing and approving approval requests in ServiceNow

The approver for a flag change can view and, if using manual approvals, approve the request in ServiceNow.

To access the change request in ServiceNow:

  1. In LaunchDarkly, click the clock icon on the flag Targeting tab. A "Pending changes" panel appears.
The "Pending changes" icon a flag.
The "Pending changes" icon a flag.
  1. Next to the request you want to view, click View. The "Review request" screen appears.
  2. Click Review in ServiceNow. The change request screen in ServiceNow appears:
A ServiceNow change request populated with LaunchDarkly approval request details.
A ServiceNow change request populated with LaunchDarkly approval request details.
  1. View or approve the request in ServiceNow. When the ServiceNow approval conditions are met, ServiceNow changes the state to "Implement."
  • Alternatively, if ServiceNow changes the state to "Canceled," LaunchDarkly changes the approval request status to "Declined."
  1. Apply the approved flag changes within LaunchDarkly by clicking Apply Changes in the "Pending changes" panel. The ServiceNow change request state changes to "Review."

If you delete the approval request in LaunchDarkly, the ServiceNow change request state changes to "Canceled."

LaunchDarkly uses ServiceNow state values from their APIs to determine if a change has been approved or denied in ServiceNow. To learn more, search for "State model and transitions" in ServiceNow's documentation and choose the article for your ServiceNow version.

Here is a table explaining the standard ServiceNow states and the equivalent LaunchDarkly approval statuses:

ServiceNow stateLaunchDarkly approval status
NewNeeds review
ImplementApproved
ReviewCompleted
CanceledDeclined

ServiceNow field mappings

Here is a table showing the fields LaunchDarkly specifies when it creates a ServiceNow approval request:

Approval request field in ServiceNowDescription
short_descriptionA brief summary of what is being requested. This is automatically generated and includes the LaunchDarkly member name, flag name, and environment. The image of the change request screen in ServiceNow, above, shows an example.
justificationA more detailed summary of what is being requested. This includes a link back to the LaunchDarkly approval request, the member-provided comment, and an automated change description. The image of the change request screen in ServiceNow, above, shows an example.
requested_byThe ServiceNow member ID associated with the LaunchDarkly member making the change. LaunchDarkly members are mapped to ServiceNow member IDs using email addresses.
start_dateThe timestamp when the approval request was created in LaunchDarkly, or the scheduled date if the approval request is for a scheduled change.
end_dateThe start_date with a small offset.