LaunchDarkly integration

You must have an Enterprise LaunchDarkly account to sync Heap segments to your LaunchDarkly account.

Automating the syncing of segments from Heap to LaunchDarkly lets you import users from Heap to LaunchDarkly to more efficiently target and deliver feature flags. This allows you to focus more on deploying features and less on managing end users between platforms.

Prerequisites

To sync segments, you must have:

  • A LaunchDarkly access token with write access for the project you want to connect to Heap. To learn more, see Configuring your access token
  • The LaunchDarkly integration enabled in Heap

Step 1: Create LaunchDarkly access token

To create (or obtain) your access token, login to your LaunchDarkly account under the environment that you wish to sync with, then complete the steps below.

  1. Click the gear icon in the left side nav to view Organization settings
  2. Click Authorization
  3. In the Access tokens section, click Create token. The Create an access token panel will appear
  4. Give your token a human-readable name
  5. Assign Role = Writer to the token from the menu
  6. Select the API version 20220603 and assign it to your token. By default, API requests you send using this token will use this API version
  7. Select the This is a service token checkbox
  8. Click Save token. The new token will appear on the Authorization page
  9. Copy and save the token somewhere secure

Once saved, you will be prompted to Copy and Save the token.  Save this, as you'll need it later to complete this setup.

Step 2: Enable this integration in Heap

  1. In Heap, navigate to Integrations > Directory
  2. Select the LaunchDarkly integration
  3. Click Set up

In the modal, paste your Token ID and save.

Launchdarkly-integration.png

Your integration is now set up!

Understanding syncing segments

By syncing segments, you can connect new or existing Heap segments to LaunchDarkly. LaunchDarkly interprets this segment as a synced segment, which makes it convenient for you to target flags to specific context groups or demographics.

Heap segments can be synced once, or at 4-hour intervals, which keeps them current with the existing segment. We recommend enabling a Recurring Sync. Steps for doing this are provided below.

By syncing segments, you can deliver flags to the right context groups precisely and on time.

Creating a segment that syncs with LaunchDarkly

Once the integration is set up, you'll be able to sync any of your segments to LaunchDarkly. To do so, select the segment and toggle on the switch to sync the segment. 

You can select either a one-time sync or to enable it as a recurring sync (every 4 hours).  Each time the segment syncs, it will send over any newly-added or newly-removed segments from the last time that the sync ran. 

The first time you sync to LaunchDarkly, you'll be prompted to select which field from Heap contains the value that you want to sync to the LaunchDarkly user. 

Be sure to choose the field in Heap that contains the LaunchDarkly user key.

Viewing synced Heap Segments in LaunchDarkly

Now that you've synced a Heap segment, you can view your synced Heap segments in LaunchDarkly. It appears on the Segments list with the Heap logo in its name

  1. Login to LaunchDarkly, then navigate to to Segments
  2. Search for segment name: the segment name used in Heap will be used as the Segment name in LaunchDarkly.
  3. Heap segments can be identified by the Heap logo under the segment name.
  4. Once the segment is in LaunchDarkly, it can be used to target audiences in those Heap segments.
Last updated
Powered by Zendesk