Capxul Docs
HooksOnboarding

CapxulOnboardingController

Preserve the current onboarding journey with app-owned slots.

CapxulOnboardingController selects intent, Profile, Organization form, account progress/failure, Organization progress/failure, and ready slots from canonical identity state. It renders no SDK markup.

The app controls intent, organizationProfile, and submittedOrganization. Commit the complete submitted request and pass caller-owned invocation options so response-loss recovery can replay the same normalized handle and request.

import { CapxulOnboardingController } from "@capxul/sdk-react";

<CapxulOnboardingController
  intent={intent}
  organizationProfile={profile}
  submittedOrganization={submitted}
  recoveryOptions={() => ({
    journeyId: journey.id,
    correlationId: crypto.randomUUID(),
  })}
  onIntent={setIntent}
  onOrganizationProfile={setProfile}
  onSubmittedOrganization={setSubmitted}
  navigation={navigation}
  slots={slots}
/>;

recoveryOptions is only used when a restored submission meets a fresh unknown or counterfactual account. The controller completes the canonical account prerequisites, then returns the immutable Organization slot so the app can replay the same request. A failed prerequisite returns that same slot for a manual retry; it neither loops nor creates the Organization automatically.

Routes, copy, form drafts, media, provider cash-out, analytics, and identifier generation remain application-owned.