Table of Contents
For multi-tenant AI SaaS, tenant onboarding needs to be fast and reliable. Manual onboarding doesn't scale; the automation pipeline matters from day one. Standard pattern: signup → provision tenant resources → ingest tenant data → first query.
Pipeline: API key generation → vector store collection creation → data source connection → ingest pipeline run → eval / smoke test → tenant ready for queries. Total: ~5-30 minutes depending on data volume. Build idempotent steps; track onboarding state per tenant; alert on stuck onboardings.
Steps
- Signup: tenant created in tenant table (Postgres)
- API key: generate per-tenant; store hashed in DB
- Vector store collection:
qdrant.create_collection(f"kb_{tenant_id}") - Data source connection: tenant-supplied OAuth tokens for Notion / Drive / etc.
- Ingest pipeline: read sources → chunk → embed → index
- Smoke test: run a few canned queries; verify retrieval works
- Mark tenant ready: tenant flag in DB; webhook to client
Infrastructure
- Job queue: Redis / RabbitMQ for async ingest
- Worker pool: separate from production inference; scaled by ingest demand
- Per-tenant rate limits: prevent one onboarding from saturating ingest pipeline
- Audit log: every onboarding step logged
- Idempotency: every step safe to re-run
- State machine: track tenant state (signup → provisioning → ingesting → ready)
First query
- Tenant API key authenticates request
- Tenant ID drives Qdrant collection routing
- Tenant tier drives model routing (free vs paid)
- Tenant rate limits enforced
- Per-tenant audit log of every query
Verdict
For multi-tenant AI SaaS, tenant onboarding automation is non-negotiable. Build the pipeline from day one; manual onboarding doesn't scale past the first dozen customers. Idempotent steps + state tracking + alerts on stuck onboardings = reliable customer experience.
Bottom line
Automate from day one. See RAG isolation.