Tenant provisioning runbook

← Module hub

How to onboard a new company on any delivery module — multi-tenant isolation via ZoneCalc_catalog + per-tenant ZC_* database.

1. Catalog tenant

  1. Provision tenant DB (ZC_*) via Subscription Portal or provisionNewTenantFromBackup.
  2. Confirm row in dbo.tenants and dbo.catalog_subscription_records on ZoneCalc_catalog.
  3. Record subscription_id, company_name, database_name.

2. Enable delivery modules

  1. Sign in at https://sbsdispatch.com/modes/ as company admin.
  2. Open any subscribed module → Management → enable modules on the delivery switchboard.
  3. Or PATCH /api/delivery-modes/switchboard/:modeKey with { "enabled": true }.

3. Fleet rollout (automated)

  1. Edit deploy/company-rollout/companies.json — set company, subscription_id, tenantDb, enabled: true.
  2. Align catalog on both hosts (sbsdispatch vs fusciadesigns) per README section 6.
  3. Run: Invoke-CompanyRollout.ps1 -Company "Your Logistics Company" -Mode full

4. Staff & portals

  1. Add dispatchers and drivers under module Management → Staff.
  2. Share portal links from the module hub (Customer · Partner · Agent).
  3. Run Simulation trace in ops console to seed 10 auditable demo orders.

5. Verify

  1. POST /api/modes/{slug}/seed-demo or Integrations → Load demo data.
  2. Ops → Simulation trace → Run full simulation → review audit timeline.
  3. node zonecalc/api/scripts/run-p2p-parity-verify.js on the server (exit 0).

Full fleet script docs: deploy/company-rollout/README.md · Platform roadmap: modes/MULTI-MODULE-ROADMAP.md