Skip to content

Data Migration

B2B SaaSE-commerce

Backfill existing users without blasting welcome emails

Import up to 5,000 historical contacts per request with original signed_up_at dates and bring over your unsubscribe, bounce, and spam-report lists without triggering welcome journeys.

Idempotent 5,000-row imports with zero accidental welcome blasts.

6 min read15 min setupUpdated
Operations manager carefully transferring archival customer ledger binders from a cardboard moving box onto a clean oak library shelf.
Bring over years of existing customers and do-not-email lists in one clean import without waking up welcome journeys.

Safe migration & suppression simulator

Compare Contacts Import vs. replaying live events

Test importing historical contacts with signed_up_at dates and suppression lists against the classic mistake of replaying user_identified events.

Illustrative migration · 25,000 users + 3,200 suppressions
15,000
ApexApex · Live Playbook Simulator

People entering journey

15,000

Cap: 3 sends / week

Recovered conversions

960

+345 over single-channel email

Unsubscribe rate

0.7%

Down from 1.9% unguarded blast

Journey performance by orchestration strategy

StrategyConversionsRevenueUnsubscribes
Static email drip615$51,660285
Apex Adaptive Journey960$80,640105

Conversions with adaptive branching

960

+$28,980 incremental revenue

  • Exits immediately on conversion so buyers never get a redundant nudge.
  • Workspace guardrails cap sends at 3/week and honor quiet hours.

Adaptive send decision path

  1. Hour 0Trigger event enters journeyGuardrails

    Apex checks suppression list, quiet hours, and weekly send cap.

  2. Hour 24Channel fallback branchAdaptive

    Non-openers with push permission receive a concise mobile/web push instead of a second email.

  3. On purchaseImmediate conversion exitExit goal

    Journey halts the instant checkout completes and credits the winning branch.

The complete playbook

Step-by-step setup, worked math, and real limits.

Steps, technical details, and live pricing.

How it works without Apex

Use Apex's POST /api/v1/contacts/import endpoint (CSV or JSON, up to 5,000 rows per request) instead of replaying user_identified server events. Imported rows preserve each person's original signed_up_at date, reconcile idempotently on userId, and join matching segments without starting welcome journeys. Pair that with POST /api/v1/suppressions/import so unsubscribed, bounced, and spam-reported addresses stay blocked from your very first send.

How Apex does it for you

Apex deduplicates re-imports by userId, fills missing signup dates without overwriting live ones, keeps journey triggers silent during bulk import, and enforces imported organization-wide suppressions before any message leaves.

How to set this up in 5 steps

  1. Import your do-not-email list first

    POST your legacy unsubscribe, bounce, and spam-report CSV or JSON (up to 5,000 rows per call) to /api/v1/suppressions/import so dead or opted-out addresses are blocked organization-wide before any send.

  2. Export existing users with stable userId and signed_up_at

    Pull userId, email, name, signed_up_at (ISO date or Unix timestamp), plan, and optional avatar_url from Cognito ListUsers, Auth0 Management API, Firebase Admin, Supabase Admin, or your database.

  3. POST batches of up to 5,000 rows to /api/v1/contacts/import

    Upload as text/csv or JSON rows. Each call is idempotent on userId and returns exact imported, reconciled, skipped, and errors counts.

  4. Verify zero welcome journeys fired automatically

    Confirm imported contacts populate your segments without triggering welcome flows. If you deliberately want a live journey to enroll imported people, opt them in explicitly from the journey page.

  5. Leave passive login reconciliation running

    Keep your post-login trigger (Auth0 Action, Cognito PostAuthentication, or Supabase/Firebase listener) active so future logins keep profiles current with zero second migration.

Passive vs. active backfill

Every team moving onto Apex asks the same first question: how do we bring in the customers we already have without accidentally sending a "Welcome to our app!" email to people who signed up two years ago?

As documented in Backfill existing users, Apex gives you two clean paths depending on whether you need dormant accounts on day one:

  • Passive backfill (zero migration scripts): Wire your post-login trigger (Cognito PostAuthentication, Auth0 Post-Login Action, or Supabase/Firebase auth listener). Every active customer reconciles automatically with their verified internal_user_id the next time they log in.
  • Active backfill (full or dormant base): Upload your existing directory through /api/v1/contacts/import in batches of up to 5,000 rows, then leave the passive trigger running so new logins stay synchronized forever.
Email deliverability specialist sorting cream and terracotta do-not-mail index cards into a wooden tray on a bright desk.
Importing legacy unsubscribes, bounces, and spam reports first protects sender reputation across your entire organization.

Import suppressions before contacts

Before you publish a single journey or campaign, bring over your unsubscribe, bounce, and spam-report lists from your old email tool using POST /api/v1/suppressions/import (up to 5,000 rows per request):

curl -X POST https://app.apex.inc/api/v1/suppressions/import \
  -H "x-api-key: apex_sk_..." \
  -H "content-type: text/csv" \
  --data-binary @unsubscribes.csv

Apex enforces two strict levels across your entire organization:

Reason columnMarketing emailReceipts & password resetsRe-import rule
unsubscribed (or blank)BlockedStill sendsSafe to re-import
bounce or spam_reportBlockedBlockedNever softened back to unsubscribed

Import contacts with real signup dates

Next, upload your customer directory to POST /api/v1/contacts/import (never replay user_identified through /api/v1/events, which timestamps rows as today and triggers live journeys):

curl -X POST https://app.apex.inc/api/v1/contacts/import \
  -H "x-api-key: apex_sk_..." \
  -H "content-type: text/csv" \
  --data-binary @users.csv
userId,email,name,signed_up_at,plan,avatar_url
u_1001,jane@example.com,Jane Doe,2024-03-02,pro,https://cdn.example.com/avatars/jane.png
u_1002,sam@example.com,Sam Lee,2025-11-18,free,
Two engineers stacking numbered kraft batch archive boxes neatly on a sunlit oak studio bench.
Idempotent 5,000-row batches let you re-run any failed chunk safely without duplicating a single userId or overwriting observed signup dates.

Key guarantees built into the import endpoint:

  1. Zero accidental welcome blasts: Imported people populate your segments immediately, but joining via import starts zero journeys. If you want a live journey to enroll newly imported members, the journey page shows the exact count and lets you start them deliberately.
  2. True cohort age preserved: Supplying signed_up_at (also accepted as signup_date, created_at, or joined_at) lets days-since-signup segment rules work accurately from minute one. Re-imports fill in missing signup dates without ever overwriting a live signup Apex already observed.
  3. Idempotent retries: Re-posting the same userId updates the existing Contact and returns { imported, reconciled, skipped, errors } rather than creating duplicate rows.

What this costs on Apex

Live Apex pricing · Pay-as-you-go

Estimated Apex cost for Mid-market SaaS importing 25,000 existing users and 3,200 suppressions, then running win-back journeys

$0 / month

Covered by monthly free allowances.

Apex meter / scheduleScenario volumeFree allowance / basisRateApex cost
Events
Ongoing web and login reconciliation events post-migration (25,000 monthly events after one-time backfill completes)
25,000 / mo1M / month$5 per 100K events$0
Messages
Targeted lifecycle and win-back sends to opted-in cohorts (6,000 monthly sends with imported suppressions enforced automatically)
6,000 / mo10K / month$60.00 per 100K messages$0
Orchestrations
Journey holdout and branch assignments (6,000 monthly journey assignments)
6,000 / mo1M / month$5 per 100K assignments$0

Historical CSV contact imports and suppression imports run directly through Apex's REST API with zero migration fee. History: 13 months no card, 3 years with card, 7 years once you've paid an invoice. Live pricing.

One-time contact and suppression imports carry no migration fee, so you only pay standard metered usage once your live traffic and opted-in lifecycle messages run.

Check readiness with your AI agent

Confirm imported segments and suppression hygiene before publishing journeys

After running your contacts and suppressions imports, ask your coding agent to verify segment populations and inspect whether any live journey should opt in imported contacts.

1Add Apex to your editor

Install in Grok Build

Opens Grok Build and adds Apex. Nothing to configure.

2Tell your agent

Prompt for your AI editor

In my Apex workspace, call list_segments and list_journeys to confirm our imported customer cohorts match expected segments and verify zero welcome journeys accidentally started on backfilled accounts.

The first time your agent calls Apex, it gives you a link to approve in the browser. There is no key to paste. In Grok Build you can also run /setup-apex.

See how editor setup works step by step

customer-migration · Grok BuildWaiting for approval
Agent
You

Set up Apex in this repo.

Set up Apex · 0 of 4
  • Signed in
  • Workspace named
  • Events arriving
  • Conversion picked
  • Stripe

Your move

Move your customer directory without annoying a single existing buyer.

Preserve true signup dates, lock in legacy bounces and unsubscribes first, and keep welcome journeys strictly for new sign-ups.