Mailchimp + Factr

Integrate Factr with Mailchimp to enrich subscriber data with personal insights. Auto-segment based on enriched facts.

Use case: Enrich subscriber profiles automatically and segment campaigns by enriched attributes

Setup Guide

1

Get API credentials

Generate a Mailchimp API key and Factr API key.

2

Build an enrichment script

Create a scheduled job that pulls new subscribers and enriches them via Factr.

3

Store facts in merge fields

Use Mailchimp merge fields to store the enriched facts.

4

Segment by enrichment data

Create dynamic segments based on enriched attributes for targeted campaigns.

Code Example

JavaScript / Node.js
// Mailchimp subscriber enrichment
const mailchimp = require('@mailchimp/mailchimp_marketing');
mailchimp.setConfig({ apiKey: process.env.MAILCHIMP_API_KEY });

async function enrichMailchimpSubscriber(listId, email) {
  // Get subscriber first
  const subscriber = await mailchimp.lists.getListMember(listId, email);

  // Enrich with Factr
  const factrRes = await fetch('https://factr.polsia.app/api/enrich', {
    method: 'POST',
    body: JSON.stringify({ email, apiKey: process.env.FACTR_API_KEY })
  });
  const { fact } = await factrRes.json();

  // Update merge fields
  await mailchimp.lists.updateListMember(listId, email, {
    merge_fields: { ENRICHED_FACT: fact }
  });
}

Key Benefits

Ready to integrate?

Join our waitlist and get early access to Factr with priority support for your integration.