> ## Documentation Index
> Fetch the complete documentation index at: https://launchdarkly.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Using the ServiceNow approvals integration

<View title="Developer" />

<View title="Federal docs">
  <Danger>
    **This feature is not available on LaunchDarkly's federal instance**

    To learn more, read <a href="/docs/home/infrastructure/federal">LaunchDarkly in federal environments</a>.
  </Danger>
</View>

<View title="EU docs" />

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](/docs/integrations/servicenow/setting-up).

## Request approval for changes in ServiceNow

To request approval for changes in ServiceNow, you must request approval for the change in LaunchDarkly. The ServiceNow approvals integration supports approval requests for feature flag and experiment changes.

To request approval in LaunchDarkly:

1. In LaunchDarkly, navigate to a feature flag or experiment and make your needed changes.
2. Click **Review and save**. The "Save changes" dialog appears.
3. If the **Reviewer(s)** menu is not visible, select the **person** icon.
4. Choose one or more reviewers from the **Reviewer(s)** menu.

<Frame caption="The &#x22;Save changes&#x22; dialog with the &#x22;Schedule changes&#x22; and &#x22;Add reviewers&#x22; icons called out.">
  <img src="https://mintcdn.com/launchdarkly/7dOLLfhGme_BglBp/images/__LD_UI_no_test/save-changes-schedule-reviewers.png?fit=max&auto=format&n=7dOLLfhGme_BglBp&q=85&s=5e5872c796d499d35bcb8caa3bd8dc64" alt="The &#x22;Save changes&#x22; dialog with the &#x22;Schedule changes&#x22; and &#x22;Add reviewers&#x22; icons called out." width="1290" height="996" data-path="images/__LD_UI_no_test/save-changes-schedule-reviewers.png" />
</Frame>

5. Enter a **Comment** to add details that help your reviewers understand the changes you made.
6. Click **Request approval**.
7. The approvers for feature flag and experiment changes receive a notification.

## View and approve approval requests in ServiceNow

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

To view and approve the change request in ServiceNow:

1. In LaunchDarkly, click the "Pending changes" section in the right sidebar of the flag or experiment. The "Pending changes" panel opens.

<Frame caption="The &#x22;Pending changes&#x22; section of a flag.">
  <img src="https://mintcdn.com/launchdarkly/ppwc2LYsjE8wwIC_/images/auto/workflows-pending-changes-sidebar.auto.png?fit=max&auto=format&n=ppwc2LYsjE8wwIC_&q=85&s=f7b735e2598d8d1c8f42dd7e020556dd" alt="The &#x22;Pending changes&#x22; section of a flag." width="586" height="180" data-path="images/auto/workflows-pending-changes-sidebar.auto.png" />
</Frame>

2. Next to the request you want to view, click **View**. The "Review request" screen appears.
3. Click **Review in ServiceNow**. The change request screen in ServiceNow appears:

<Frame caption="A ServiceNow change request populated with LaunchDarkly approval request details.">
  <img src="https://mintcdn.com/launchdarkly/6toei-i72Mf97ImT/images/__third_party/servicenow-change-request.png?fit=max&auto=format&n=6toei-i72Mf97ImT&q=85&s=60440297352a6da7a6222dfea783281c" alt="A ServiceNow change request populated with LaunchDarkly approval request details." width="1173" height="288" data-path="images/__third_party/servicenow-change-request.png" />
</Frame>

4. 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."
5. Apply the approved changes:
   * If your LaunchDarkly environment's approval settings specify to **Automatically apply changes in LaunchDarkly**, then no further action is required. LaunchDarkly applies the changes when the associated ServiceNow change request is approved.
   * If your LaunchDarkly environment's approval settings do not specify to automatically apply changes, then you must apply the changes manually. You can do this within LaunchDarkly by clicking **Apply Changes** in the "Pending changes" panel.

After you apply the approved changes, 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 the ServiceNow 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](https://www.servicenow.com/docs/) and choose the article for your ServiceNow version.

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

<table>
  <thead>
    <tr>
      <th>ServiceNow state</th>
      <th>LaunchDarkly approval status</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>New</td>
      <td>Needs review</td>
    </tr>

    <tr>
      <td>Implement</td>
      <td>Approved</td>
    </tr>

    <tr>
      <td>Review</td>
      <td>Completed</td>
    </tr>

    <tr>
      <td>Canceled</td>
      <td>Declined</td>
    </tr>
  </tbody>
</table>

## ServiceNow field mappings

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

<table>
  <thead>
    <tr>
      <th>Approval request field in ServiceNow</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><code>short\_description</code></td>
      <td>A brief summary of what is being requested. This is automatically generated and includes the LaunchDarkly member name, flag or experiment name, and environment. The [change request screen in ServiceNow](#view-and-approve-approval-requests-in-servicenow), above, shows an example.</td>
    </tr>

    <tr>
      <td><code>justification</code></td>
      <td>A 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](#view-and-approve-approval-requests-in-servicenow), above, shows an example.</td>
    </tr>

    <tr>
      <td><code>requested\_by</code></td>
      <td>The ServiceNow member ID associated with the LaunchDarkly member making the change. LaunchDarkly members are mapped to ServiceNow member IDs using email addresses.</td>
    </tr>

    <tr>
      <td><code>start\_date</code></td>
      <td>The timestamp when the approval request was created in LaunchDarkly, or the scheduled date if the approval request is for a scheduled change.</td>
    </tr>

    <tr>
      <td><code>end\_date</code></td>
      <td>The <code>start\_date</code> with a small offset.</td>
    </tr>
  </tbody>
</table>
