Merging Onboarding Progress After an Account Merge
When two accounts merge, their checklists don't merge automatically. Decide what happens to duplicate and conflicting progress before support has to.
Account merges happen for reasons that have nothing to do with onboarding: two people on the same team signed up separately before anyone noticed, a company acquired another and wants one account instead of two, or a user created a duplicate by mistake and support is asked to fold it into the real one. Whatever the reason, the moment two accounts become one, their onboarding checklists — which were never designed to be combined — have to be reconciled into something a single user can look at and trust.
The checklist itself usually survives the merge fine as a schema problem: you can write a migration that reassigns rows from one account ID to another in an afternoon. The hard part is deciding what the combined checklist should actually say when the two source accounts disagree about what's been done, and that decision has to be made before the migration runs, not discovered by a confused user afterward.
Three ways the two checklists can disagree
Merging two completed-step sets produces one of three situations, and each needs a different rule:
- Both accounts completed the same step. This is the easy case — keep one record, and prefer the earlier completion timestamp if anything downstream (a trial-length calculation, a cohort assignment) depends on when the step actually happened.
- Only one account completed a step. The merged account should show it as complete. A user who already connected a data source or set up billing on the account being merged in shouldn't be told to do it again just because the surviving account id never recorded that specific action.
- The two accounts completed a step differently — for example, each invited a different set of teammates, or picked a different default workspace setting as part of a step. There's no safe automatic merge here; the honest move is to flag the step for a one-time manual decision rather than silently picking one side's answer and discarding the other.
Decide account precedence before you decide step precedence
Most merges aren't symmetric: one account is the one being kept (usually the older, or the one with the paying subscription, or the one an admin designates), and the other is being absorbed into it. Settle that precedence first, as a property of the merge itself, and the step-by-step reconciliation above becomes a matter of following that rule rather than inventing a new tiebreaker for every step type. Without a stated precedence, two engineers writing two different parts of the migration will pick different defaults and the result depends on which one shipped first.
Code: a merge that's explicit about what it skips
func MergeOnboardingProgress(survivorID, mergedID string) (*MergeReport, error) {
survivor, err := loadSteps(survivorID)
if err != nil {
return nil, err
}
merged, err := loadSteps(mergedID)
if err != nil {
return nil, err
}
report := &MergeReport{AccountID: survivorID}
for stepKey, mergedStep := range merged {
survivorStep, exists := survivor[stepKey]
switch {
case !exists || (!survivorStep.Done && mergedStep.Done):
// survivor never did it, or only the merged account did
setStepDone(survivorID, stepKey, mergedStep.CompletedAt, mergedStep.ActorID)
report.Carried = append(report.Carried, stepKey)
case survivorStep.Done && mergedStep.Done:
// both done; nothing to write, already correct
continue
default:
// survivor already done, merged one differs in a way that
// can't be collapsed automatically (different payload, e.g.)
report.NeedsReview = append(report.NeedsReview, stepKey)
}
}
return report, nil
}The function above never resolves the "needs review" case on its own; it returns a report that an admin or support agent reads and acts on. Writing a plausible guess for an ambiguous step is worse than surfacing it, because a silent wrong guess looks exactly like a correct merge until someone notices a setting changed that nobody touched.
What happens to the audit trail
If you're keeping a tamper-evident log of who completed each step, the merge needs to carry that history over too, not just the current boolean. Reassign the merged account's events to the survivor account ID, and add one new event marking the merge itself — who triggered it, when, and which account ID was absorbed. A reviewer reading the log afterward should be able to tell that a "completed" entry predates the account's own signup date because it came from a merge, rather than assuming the data is wrong.
Notify the user once, not per step
Don't surface the reconciliation as a burst of individual step notifications ("step X is now complete!") immediately after a merge; that reads as noise, not information, especially if several steps changed state at once. One summary — "we combined your two accounts; here's what changed in your setup" — linking to the steps that need manual review is enough. For the general question of how many onboarding notifications is reasonable before they stop being read, see notification fatigue.
What to measure instead of guessing it works
There's no honest number to quote here without having instrumented it: how often merges produce a "needs review" step, and how long those reviews sit open before someone resolves them, is specific to your own account base and support process. If you don't have that instrumentation yet, the thing to build is a counter on `MergeReport.NeedsReview` length per merge, logged wherever merges are triggered, and a dashboard panel on how many of those are still unresolved after seven days. Until that exists, don't estimate a review rate — report that it isn't measured yet and point at this as the fix.
For the related question of giving each user their own progress before they're even a full account — which is where some duplicate-account problems originate — see tracking progress for anonymous visitors. The docs cover the step API this merge logic is built on.