Skip to main content

Scenario

Your Segment workspace has behavioral audiences — high-value customers, churning users, recently activated accounts, trial converters. Each audience represents a real behavioral cluster. You pull audience definitions and member counts, map each audience to a Mavera persona, and run Focus Groups where each persona represents a Segment audience. The result is qualitative research anchored to quantitative behavioral segments.

Architecture

Code

Example Output

Error Handling

The /spaces/{id}/audiences endpoint requires Segment Engage (formerly Personas). If you’re on the free Connections plan, audiences aren’t available. The code includes fallback sample data for testing.
Segment Space IDs use the format spa_xxxxx. Find yours in Segment → Engage → Settings, or via GET /spaces on the Management API.
The estimatedSize field is an approximation. For exact counts, use the Profiles API to query audience membership directly, but this is significantly slower.

What’s Next

Segment Integration

Back to Segment integration overview

Profile Traits → Custom Persona Source

Create trait-enriched personas from computed traits

Focus Groups API

Full reference for POST /api/v1/focus-groups

Personas API

Full reference for POST /api/v1/personas