New-client onboarding automation update #24
Notifications
Due Date
No due date set.
Blocks
Depends on
#25 Decommission Easy!Appointments + n8n booking-sync
BPPP/smb-online
#15 Booking schema + tenancy-safe data access layer
BPPP/smb-online
Reference: BPPP/smb-online#24
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
#14
What to build
New-client onboarding produces a working booking setup automatically, so a new client's landing
page booking button isn't broken while they get around to configuring it themselves.
n8n/onboarding.jsonis extended to insert, for each new client: a defaultresourcesrow, astarter
servicesrow, and ausersrow with a temp password (delivered the same way otheronboarding credentials are handled today, e.g. via the existing
credentialsCRM entity).n8n/onboarding.jsonis removed as part of this samechange (no more auto-creating an EA provider account).
Acceptance criteria
slug, adefault resource, at least one active service, and an owner
usersrow with credentialsrecorded in the CRM's
credentialsentity./book/<slug>page (ticket 3) is immediately functional (shows a bookableslot grid) without any manual setup.
Blocked by
Implemented in
aabd1d5.n8n/onboarding.json: afterSave client, a newBuild provisioningnode fans out to create a default resource (Hauptressource, Mon-Sat 09:00-18:00 hours so slots are bookable immediately), a starter service (Termin, 30 min), and an owner-login user. A newUser created?If-gate only firesSave credentialwhen the owner-user creation actually succeeded, so a failed call can't leave a stale/misleading credentials row. The EA-provisioning chain (EA build/create service+provider, EA booking info/update client) is fully removed -- no dangling references remain.Computenow derives and setsclients.slug(slugified business name + random suffix).POST /api/resources,POST /api/services,POST /api/owner_users, all X-CRM-Token gated, backed bybooking_db.py's existing tenancy-scopedcreate_resource/create_service/create_userhelpers.slugwas already a DB column (#17) but missing fromdb.py'sclientscolumn list, so the generic/api/clientsPOST silently dropped it -- onboarding could never actually set a client's slug until now.Acceptance criteria:
slug, a default resource (with hours), an active service, and an ownerusersrow with credentials recorded incredentials./book/<slug>is immediately functional -- resource has hours configured so_available_slotshas something to return.149 tests pass (
backoffice/app/tests), including a newtest_provisioning.pycovering all three new routes plus slug persistence through/api/clients.