For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • Get started
    • Overview
    • Onboarding
    • Get started
    • Launch Insights
    • LaunchDarkly architecture
    • LaunchDarkly vocabulary
  • AgentControl
    • AgentControl
    • Manage AgentControl
  • Feature flags
    • Create flags
    • Target with flags
    • Flag templates
    • Manage flags
    • Code references
    • Contexts
    • Segments
      • Creating segments
      • Targeting segments
      • Managing segments
      • Segment types
        • Segments synced from external tools
          • Syncing segments with Amplitude cohorts
          • Syncing segments with Census
          • Syncing segments with Heap
          • Syncing segments with Hightouch
          • Syncing segments with RudderStack Audiences
          • Syncing segments with Tealium Audiences
          • Syncing segments with Twilio Segment Audiences
          • Syncing segments with Zeotap
      • SDK and integration configuration for segments
  • Releases
    • Releasing features with LaunchDarkly
    • Release policies
    • Percentage rollouts
    • Progressive rollouts
    • Guarded rollouts
    • Feature monitoring
    • Release pipelines
    • Engineering insights
    • Release management tools
    • Applications and app versions
    • Change history
    • Restoring previous flag versions
  • Observability
    • Observability
    • Session replay
    • Error monitoring
    • Logs
    • Traces
    • Observability metrics
    • Product analytics events
    • LLM observability
    • Alerts
    • Dashboards
    • Service map
    • Vega for auto-remediation
    • Observability MCP server
    • Search specification
    • Observability settings
    • Observability integrations
  • Experimentation
    • Experimentation
    • Experiment metric types
    • Experiment configuration
    • Managing experiments
    • Analyzing experiments
    • Multi-armed bandits
    • Holdouts
  • Metrics and events
    • Metrics in LaunchDarkly
    • Creating metrics
    • Metric groups
    • Events
    • Autogenerated metrics
  • Warehouse native
    • Warehouse native metrics
    • Setting up external warehouses
    • Creating experiments using warehouse native metrics
  • Infrastructure
    • Connect apps and services to LaunchDarkly
    • LaunchDarkly in China and Pakistan
    • LaunchDarkly in the European Union (EU)
    • LaunchDarkly in federal environments
    • Public IP list
  • Your account
    • Projects
    • Views
    • Environments
    • Tags
    • Teams
    • Members
    • Roles
    • Account security
    • Feature previews
    • Billing and usage
    • Changelog
Sign inTry it free
LogoLogo
On this page
  • Overview
  • Prerequisites
  • Create a segment that syncs with Twilio Segment
  • Configure the LaunchDarkly Audiences destination
  • Add the LaunchDarkly Audiences destination as a Twilio Segment Audience
Feature flagsSegmentsSegment typesSegments synced from external tools

Syncing segments with Twilio Segment Audiences

Was this page helpful?
Previous

Syncing segments with Zeotap

Next
Built with

Overview

This topic explains how to create segments that sync with a Twilio Segment Audience. Segment syncing lets you import audiences from Twilio Segment to LaunchDarkly to more efficiently target and deliver feature flags. You manage the membership of these segments in Twilio.

The primary benefit of syncing segments with Twilio Segment is the automatic syncing between Twilio Segment and LaunchDarkly. This lets you concentrate more on deploying features and less on managing end users between platforms. You can connect a new or existing Twilio Segment Audience to LaunchDarkly. LaunchDarkly interprets each Audience as a segment.

Prerequisites

The general prerequisites for synced segments apply to syncing segments with Twilio Segment Audiences.

In order to sync segments with Twilio Segment Audiences, you must additionally meet the following prerequisites:

  • You must have a Twilio Segment account with the Engage Audiences feature enabled. Contact your Twilio Segment Customer Success Manager to enable the Engage Audiences feature.
  • You must have a Twilio Segment role that allows you to create destination connections and Engage Audiences. To learn more, read Roles.
  • You must have a LaunchDarkly access token with write access for the project you want to connect to Twilio Segment. To learn more, read Configure an access token.
  • You must have a LaunchDarkly client-side ID for the environment you want to connect to Twilio Segment. To learn more, read View or copy SDK keys and credentials.
  • If you are using server-side SDKs, or client-side SDKs with the Relay Proxy, there are additional prerequisites.

Create a segment that syncs with Twilio Segment

To configure a segment that syncs with a Twilio Segment Audience, you must choose an Audience in Twilio Segment and configure it to use the LaunchDarkly Audiences destination. When you do this, the cohort appears as a segment in LaunchDarkly.

To do this, your will need to first configure the LaunchDarkly Audiences destination and then add the LaunchDarkly Audiences destination as a Twilio Segment Audience.

Configure the LaunchDarkly Audiences destination

To add LaunchDarkly as an Audiences destination:

  1. Sign in to Twilio Segment and navigate to the Connections tab.

  2. Navigate to the Catalog tab and search for LaunchDarkly Audiences.

  3. Click Add destination.

  4. Select an existing Engage space as the data source. If you do not have an existing Engage space, follow Twilio Engage Foundations Onboarding Guide.

  5. Click Confirm source.

  6. On the Basic settings page, provide a human-readable Name for the destination. Because each instance of a LaunchDarkly Audiences destination can only sync to a single project and environment in LaunchDarkly, we recommend including project and environment information in the name.

  7. Enter the service token you created previously in the LaunchDarkly Service Token field.

  8. In the LaunchDarkly client-side ID field, enter the client-side ID corresponding to the environment where your synced segment will be created in LaunchDarkly. To learn more, read Copying your LaunchDarkly client-side ID.

  9. Click the Enable Destination toggle.

    The LaunchDarkly Audiences destination "Basic settings" page in Twilio Segment.

    The LaunchDarkly Audiences destination "Basic settings" page in Twilio Segment.
  10. Navigate to the Mappings tab of your LaunchDarkly Audiences destination configuration.

  11. Click New Mapping.

  12. Select the Sync Engage Audience to LaunchDarkly pre-built mapping.

    The "Add Mapping" modal in Twilio Segment with the "Sync Engage Audience to LaunchDarkly" mapping highlighted.

    The "Add Mapping" modal in Twilio Segment with the "Sync Engage Audience to LaunchDarkly" mapping highlighted.
  13. Scroll to Select mappings and modify the following settings as needed:

    • Context kind: The LaunchDarkly context kind for the LaunchDarkly synced segment. The default value is user. For more information, read Context kinds.
    • Context key: The Twilio Segment audience property that will be used as the context key. For most customers, the default value of Use Segment UserId only is recommended.
    • Enable batching: Select Yes.

    The "Select mappings" section of the "Edit: Sync Engage Audience to LaunchDarkly" in Twilio Segment configured with recommended settings.

    The "Select mappings" section of the "Edit: Sync Engage Audience to LaunchDarkly" in Twilio Segment configured with recommended settings.
  14. Click Save.

  15. Ensure the Status toggle on the Mappings tab is enabled.

    The "Mappings" tab of the LaunchDarkly Audiences page in Twilio segment with the "Sync Engage Audience to LaunchDarkly mapping" enabled.

    The "Mappings" tab of the LaunchDarkly Audiences page in Twilio segment with the "Sync Engage Audience to LaunchDarkly mapping" enabled.

Add the LaunchDarkly Audiences destination as a Twilio Segment Audience

To add the LaunchDarkly Audiences destination to your Twilio Segment Audience:

  1. Navigate to the Audiences page in Twilio Segment and select the Audience you would like to sync with LaunchDarkly.

  2. In the Destinations section of the Audience page, select Add destination.

  3. Select the LaunchDarkly Audiences destination that you configured previously.

  4. Click Save. The default values for Send Identify and Send Track are appropriate.

  5. Click Add 1 destination.

  6. Verify that your Audience now displays your LaunchDarkly Audiences destination as a synced destination.

    An example Twilio Segment Audience page configured with a successfully configured LaunchDarkly Audiences destination highlighted.

    An example Twilio Segment Audience page configured with a successfully configured LaunchDarkly Audiences destination highlighted.
  7. The first sync will start about ten minutes after adding the LaunchDarkly Audiences destination. A new LaunchDarkly segment will be created automatically. Navigate to the Segments page in LaunchDarkly to verify that your new synced segment exists in LaunchDarkly. The segment’s name will be the same as the Twilio Segment Audience’s name.