Documentation Index
Fetch the complete documentation index at: https://docs.fanfare.io/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Klaviyo integration enables bidirectional synchronization between your Klaviyo email lists and Fanfare audiences. This allows you to:- Import Klaviyo lists as Fanfare audiences
- Automatically sync consumer profiles between platforms
- Target specific customer segments in your experiences
- Trigger email campaigns based on experience participation
Prerequisites
Before setting up the Klaviyo integration, you need:- A Klaviyo account with at least one list
- A Klaviyo Private API Key with the following permissions:
Lists: ReadProfiles: ReadProfiles: Write(if using bidirectional sync)
Setup
Step 1: Get Your Klaviyo API Key
- Log in to your Klaviyo account
- Navigate to Account > Settings > API Keys
- Click Create Private API Key
- Give it a descriptive name (e.g., “Fanfare Integration”)
- Select the required scopes:
Lists: ReadProfiles: Read
- Copy the generated API key (starts with
pk_)
Security Note: Store your API key securely. You will not be able to view it again after leaving the Klaviyo API
keys page.
Step 2: Configure Klaviyo in Fanfare
- Navigate to Settings > Integrations in the Fanfare admin
- Find Klaviyo and click to configure
- Paste your Klaviyo API key
- Click Save
Step 3: Verify Connection
After saving, Fanfare will verify the connection by fetching your Klaviyo lists. If successful, you’ll see a list of available lists to sync.Data Sync
How Sync Works
The Klaviyo sync uses Fanfare’s sync source system to maintain data consistency:Sync Source Types
The integration creates two types of sync sources:| Sync Source | Description |
|---|---|
klaviyo:list | Links a Klaviyo list to a Fanfare audience |
klaviyo:profile | Links a Klaviyo profile to a Fanfare consumer |
Importing a Klaviyo List
To import a list from Klaviyo:- Go to Audiences in the Fanfare admin
- Click Import from Klaviyo
- Select the list(s) you want to import
- Click Import Selected
- Create a sync source for the list
- Create a new audience with the list name
- Queue a background job to sync all profiles
- Create or update consumer records for each profile
Sync Status
Each sync source tracks its status:| Status | Description |
|---|---|
PENDING | Sync has been queued but not started |
SYNCING | Sync is in progress |
SUCCESS | Last sync completed successfully |
FAILED | Last sync encountered an error |
Automatic Resync
Note: Currently, Klaviyo list syncs are triggered manually. Automatic periodic resync is planned for a future
release.
Consumer Mapping
Profile to Consumer Mapping
When syncing profiles, Fanfare maps Klaviyo fields to consumer records:| Klaviyo Field | Fanfare Field |
|---|---|
email | email |
first_name + last_name | fullName |
phone_number | phone |
id (profile ID) | primaryExternalId |
Deduplication
Fanfare deduplicates consumers by email address:- If a consumer with the same email exists, the existing record is updated
- The Klaviyo profile is linked via
primarySyncSourceId - New consumers are created for profiles without a matching email
Audience Membership
Imported consumers are automatically added to the synced audience:API Reference
Get Klaviyo Lists
Retrieves all Klaviyo lists with their sync status.Configure Klaviyo Settings
Update the Klaviyo API key in organization settings.Best Practices
API Key Management
- Use a dedicated API key for the Fanfare integration
- Only grant the minimum required scopes
- Rotate the API key periodically
- Revoke the key immediately if compromised
List Management
- Keep list names consistent between Klaviyo and Fanfare
- Avoid importing very large lists (>100k profiles) in a single sync
- Monitor sync status for failed imports
Performance
- The sync processes profiles at ~75 per second (Klaviyo rate limit)
- Large lists may take several minutes to fully sync
- Syncs run in the background and don’t block the UI
Troubleshooting
Common Issues
“Klaviyo API key not found” error The API key hasn’t been configured or is invalid.- Verify the key starts with
pk_ - Check the key hasn’t been revoked in Klaviyo
- Re-enter the key in Settings > Integrations
- Check event processor logs for errors
- Verify the Klaviyo sync queue is operational
- Contact support if the issue persists
- Verify profiles have valid email addresses in Klaviyo
- Check for duplicate email handling
- Review sync source logs for errors
- Check for existing audiences with the same name
- Verify organization permissions
- Review the sync source status
Checking Sync Status
You can check the status of a sync via the API:Logs
Klaviyo sync operations are logged with the following identifiers:- Handler:
klaviyo.handler - Processor:
klaviyo/sync-list - Log Fields:
organizationId,syncSourceId,profileId
Limitations
| Limitation | Description |
|---|---|
| One-way sync | Currently only imports from Klaviyo to Fanfare |
| Rate limits | Subject to Klaviyo’s API rate limits (75 profiles/second) |
| List size | Very large lists may timeout; import in batches if needed |
| Field mapping | Limited to email, name, and phone fields |
Future Enhancements
Roadmap: Bidirectional sync and automatic resync are planned for future releases.