Open the console

Onboarding Checklist State When a User Switches Between Organizations

If one user belongs to several organizations, their onboarding checklist has to track progress per org, not per user. Here is how to key the data.

Onboarding Checklist State When a User Switches Between Organizations

A single user with access to two organizations is common in B2B products: a consultant working several client accounts, a freelancer with their own workspace and a client's, an employee who joined a second team. Your onboarding checklist was probably built assuming one user has one progress record. The moment that assumption breaks, steps either leak across organizations or reset in ways nobody intended.

The symptom before the cause

The bug report usually reads like this: "I finished setup in Org A, switched to Org B, and the checklist still shows everything done." Or the reverse: a user who genuinely completed the same step twice — once per org — sees it marked incomplete in the org where they definitely did it. Both point to the same root cause: progress is keyed by user ID alone, when it needs to be keyed by the pair of user and organization.

Key progress by (user, org), not by user

If your onboarding_progress table (or whatever stores step completion) has a single foreign key to the user, every organization that user touches shares one row per step. The fix is a composite key:

CREATE TABLE onboarding_progress (
  user_id      TEXT NOT NULL,
  org_id       TEXT NOT NULL,
  step_key     TEXT NOT NULL,
  completed_at TIMESTAMP,
  PRIMARY KEY (user_id, org_id, step_key)
);

This is a schema change, not a UI change, and it has to land before you can trust anything the checklist displays across more than one organization. If you are embedding a checklist widget, confirm what identifier it sends on each request — some integrations default to a user token with no org context at all, which is the same bug one layer up.

Which steps are actually per-org

Not every step belongs to the organization. Split your checklist into two groups before you touch the data model:

  • Org-scoped steps: connecting a billing method, inviting teammates, configuring a webhook endpoint. These are properties of the organization and must be tracked per org.
  • User-scoped steps: verifying an email address, setting a display name, enabling two-factor authentication. These belong to the user and are already correct once, regardless of how many orgs they switch into.

Mixing the two in one table under one key is what causes the leak. A user-scoped step correctly appears "done" in every org because it is genuinely done for that user. An org-scoped step must not.

What the client needs to send

Once the backend tracks progress per org, the client has to tell it which org is active on every read and write — not infer it from the last request. The active org switch is a real event in your application (a dropdown, a URL segment, a cookie), and the checklist call needs to carry that same org identifier explicitly:

GET /api/onboarding/steps?org_id=org_48fa
Authorization: Bearer <user token>

If the org comes from a session default instead of the request itself, a user with two browser tabs open on two different organizations will see one tab's checklist bleed into the other — a subtler version of the same bug, and harder to reproduce because it depends on tab order.

Migrating existing data

If your checklist already shipped with a user-only key, you cannot cleanly split historical rows into org-scoped and user-scoped after the fact without a decision: do existing single-org users get their history attached to their one org, or does it stay ambiguous? For a product where every user has historically belonged to exactly one organization, the safe migration is to backfill org_id from each user's current (only) org and treat any future second-org signup as the first real test of the composite key. Write that backfill as a one-time script, not a runtime fallback — a runtime fallback that guesses the org when none is given is the same bug wearing a disguise.

What to measure instead of guessing

We do not have data on how common multi-org users are in a typical onboarding flow, and no benchmark exists for what fraction of checklist bugs trace back to this specific key design — those numbers depend entirely on your product's account structure. What you can measure directly once the composite key is in place: log every onboarding step request with its resolved (user_id, org_id) pair, and alert when the same user completes the same org-scoped step under two different org IDs within a short window. That pattern is either a legitimate multi-org workflow or a sign the client is sending the wrong org — and only your own logs can tell you which.

Related reading

If invited teammates are part of your onboarding flow, see onboarding for invited users for how invitation state interacts with per-account progress. For the general shape of the data model this builds on, onboarding steps hidden by permission covers the related case of scoping steps by role rather than by organization. You can see the checklist running against a real instance in the live preview.

Try it on your app