SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Sync Warehouse Data to Segment to Build Audiences

Question

We are using a Data Warehouse to house our customer data and want to push it to Segment so the audiences can be pushed to downstream destinations, such as Google and Meta. What is the process for us to complete this connection?

 

Product

Twilio Segment

 

Environment

Segment Console

 

Answer

To extract customer data housed in your Data Warehouse, build audiences within Segment, and push those audiences to downstream destinations, you will utilize the Segment Reverse ETL pipeline. This architecture allows you to extract your warehouse data (from supported sources like Snowflake, BigQuery, Redshift, Postgres, or Databricks), route it into Twilio Engage to build your audiences, and finally map those computed audiences to your target ad destinations.
 
Here is the step-by-step process to complete this connection:
 
Step 1: Set up your Data Warehouse as a Reverse ETL Source First, you must allow Segment to query your warehouse data and track incremental changes.
  • In your Data Warehouse, create a dedicated user or service account with the appropriate roles. This user requires read permissions for the databases, schemas, and tables where your data resides, as well as write permissions for a Segment-managed schema (typically named __SEGMENT_REVERSE_ETL) where sync progress is tracked.
  • In the Segment app, navigate to Connections > Sources, select the Reverse ETL tab, and click + Add Reverse ETL source to select and configure your specific warehouse.
Step 2: Add a Data Model Models define the specific datasets you intend to extract.
  • In your newly created Reverse ETL source, click Add Model.
  • Select SQL Editor to write the query that targets your customer data. Alternatively, Segment's dbt extension is supported for BigQuery, Databricks, Postgres, Redshift, or Snowflake if you want to centralize model management and versioning.
  • Choose a Unique Identifier column so Segment can track new, updated, and deleted records efficiently using checksums.
Step 3: Route Data to Segment Profiles Next, you will send this modeled data into your Engage space.
  • Navigate to Connections > Destinations, select the Reverse ETL tab, and click Add Reverse ETL destination.
  • Choose the Segment Profiles destination and link it to your Reverse ETL source.
  • On the Mappings tab, click Add Mapping, choose your data model, and select the Send Identify action. This will map your warehouse records to user profiles in Engage.
Step 4: Build Your Audiences With customer data now flowing into Segment Profiles, you can create your segments.
  • Go to Engage > Audiences and click + New audience.
  • Utilize the traits and event criteria imported from your warehouse to define your audience parameters, preview your results, and then save.
Step 5: Connect Audiences to Ad Platforms Finally, sync these computed audiences to Google and Meta.
  • From the overview page of your new audience, click + Add destination.
  • Search for and configure your desired destinations, such as Facebook Custom Audiences, Facebook Conversions API, Google Ads Remarketing Lists, or Google Ads Conversions.
  • Map your user identifiers (such as email or mobile advertising IDs) so the downstream networks can match the users. Segment will handle the initial list upload and automatically maintain state as users enter or exit the audience.

 

Additional Information 

  • No MTU Costs: The Segment Profiles destination is not subject to API call or MTU costs. Any users or accounts created and updated by the Segment Profiles destination do not count towards your API call or MTU usage.
  • Initial vs. Ongoing Syncs: When syncing to a list destination (like Facebook Custom Audiences or Google Ads Remarketing Lists), Engage uploads lists of users directly to the destination. When you first create an audience, Segment uploads the entire list of audience users to the destination. Later syncs only upload the users that have been added or removed since the last sync.

 

 

Have more questions? Submit a request
Powered by Zendesk