This topic explains how to configure the LaunchDarkly ServiceNow integration for flag approvals.
In order to complete this topic, you must meet the following prerequisites:
You must have a LaunchDarkly account with a Writer, Admin, Owner, or a custom role that allows the createIntegration action on the integration resource.
You must have an existing ServiceNow account with the admin role.
If your ServiceNow instance has IP address access control enabled, you must create inbound ServiceNow IP access control rules corresponding to the outboundAddresses from LaunchDarkly’s public IP list.
To learn how to create IP access control rules, search for “IP Address Access Control” in ServiceNow’s documentation and choose the article for your ServiceNow version. For example, if your ServiceNow version is Zurich, read IP Address Access Control.
To begin, create a ServiceNow standard change template that you want to use for all proposed changes originating from LaunchDarkly. We recommend creating a dedicated template for LaunchDarkly changes.
To learn how to propose a new standard change template, search for “Propose a standard change template” in ServiceNow’s documentation and choose the article for your ServiceNow version. For example, if your ServiceNow version is Zurich, read Propose a standard change template.
If you do not use a ServiceNow standard change template, we recommend using the Custom approvals integration instead.
Next, create an application registry entry in ServiceNow. This provides the OAuth Client ID and Client Secret you will use when you set up the integration in LaunchDarkly.
To do this, first find the Redirect URL in LaunchDarkly:
You will use this redirect URL when you create the application registry entry in ServiceNow. To learn how to create the application registry entry, search for “Create OAuth API endpoints for external clients” in ServiceNow’s documentation and choose the article for your ServiceNow version. For example, if your ServiceNow version is Zurich, read Create OAuth API endpoints for external clients.
When you save the new entry, ServiceNow displays the Client ID and Client Secret for this application. Save these for use in the integration setup section.

We recommend using a generic service account to create the application registry entry in ServiceNow. In ServiceNow change requests created by LaunchDarkly approval requests, the ServiceNow account associated with the OAuth client appears in the Requested by field.
The LaunchDarkly member who creates the approval appears in the Short description field.
Here’s an example:

To use the ServiceNow integration to perform flag approvals, you must first establish an OAuth connection between your LaunchDarkly and ServiceNow accounts.
After you create the connection, you can either:
To establish an OAuth connection:

https://launchdarkly.service-now.com.Your LaunchDarkly and ServiceNow accounts are now connected. Next, enable the ServiceNow approvals integration for your LaunchDarkly environment.
By default, LaunchDarkly’s approvals request feature only creates approval requests in LaunchDarkly. You can change this behavior so LaunchDarkly creates change requests in ServiceNow. To do this, you must update your chosen environment’s approval settings. The ServiceNow approvals integration supports approval requests for feature flag changes only.
Here’s how:

justification if you do not provide a value.
You can create your workflow using either of these two ServiceNow workflow creation methods:
To learn more, search for “Flow Designer” and “Workflow Editor” in ServiceNow’s documentation and choose the articles for your ServiceNow version.
The screenshots below are from the Flow Designer, but you can create a workflow the same triggers, actions, and conditions using the Workflow Editor if you prefer.
To create a LaunchDarkly approvals workflow in ServiceNow:
is “New” and “Standard Change Template version,” “Template,” “Name” is “LaunchDarkly template.”

if condition that requires Approval State is “Approved.”
if condition.ServiceNow requires change request records to move through states in a certain order, so you must create two separate actions that move the record “State” first to “Scheduled” and then to “Implement.” The record must end in the “Implement” state for LaunchDarkly to process the approval.

else condition, add an “Update Change Request Record” Action that moves the “State” to “Canceled.” LaunchDarkly uses this state to determine that the approval request has been rejected.
You can now request manual approvals in ServiceNow for flag changes in LaunchDarkly.

Automatic approval workflows create a correlating ServiceNow Change Request for any LaunchDarkly flag changes. Automatic approvals are for record-keeping only and no actual approval is requested. Automatic approval workflows resemble manual approval workflows but without the approval Action.
To create an automatic approval workflow:
is “New”is “LaunchDarkly auto-approve template”
if condition.ServiceNow requires change request records to move through states in a certain order, so you must create two separate actions that move the record “State” first to “Scheduled” and then to “Implement.” The record must end in the “Implement” state for LaunchDarkly to be able to process the record.

You can now track your LaunchDarkly flag changes in ServiceNow.
