Dashboard Onboarding Status
The dashboard onboarding API stores a tenant user's guided-tour progress in the backend. This prevents onboarding state from being tied only to browser local storage and allows the dashboard to resume the tour consistently across sessions.
Endpoint Overview
The onboarding status resource is tenant-scoped and authenticated with the same Cognito-backed dashboard authorization model used by other tenant dashboard endpoints.
| Operation | Endpoint | Purpose |
|---|---|---|
| Get onboarding status | GET /tenants/{id}/onboarding-status | Returns whether the tour is active, completed, skipped, and which steps have already been completed. |
| Update onboarding status | PATCH /tenants/{id}/onboarding-status | Marks steps as completed, advances the current step, or completes/skips the entire guided tour. |
Reading Onboarding State
The dashboard should call GET /tenants/{id}/onboarding-status during application bootstrap after the authenticated tenant context is known. If the response indicates that onboarding is incomplete and not skipped, the dashboard can render the guided tour overlay.
const status = await client.get(`/tenants/${tenantId}/onboarding-status`);
if (!status.completed && !status.skipped) {
showGuidedTour(status.current_step);
}
Updating Progress
Use PATCH /tenants/{id}/onboarding-status whenever the user completes a meaningful step. The backend supports incremental progress updates as well as full completion or skip actions.
await client.patch(`/tenants/${tenantId}/onboarding-status`, {
current_step: "create_first_mandate",
completed_steps: ["open_dashboard", "review_api_key"],
});
When the user finishes or dismisses the guided flow, persist that final state to avoid repeatedly showing the overlay.
| User action | Recommended update |
|---|---|
| Completes one step | Append the step to completed_steps and set current_step to the next step. |
| Completes the tour | Set completed to true and persist all completed steps. |
| Skips the tour | Set skipped to true so the overlay stays hidden. |
Dashboard Wiring Guidance
The dashboard should treat the backend onboarding status as the source of truth and may use local state only as a transient rendering cache. If the PATCH call fails, the UI should keep the tour visible and allow the user to retry instead of silently marking the step complete.