Clinic agent · internal

Provision a clinic demo

Create an isolated tenant for a clinic, generate the access code and follow the Telegram Secretary Mode or shared demo number steps.

1. Your operator key

Use this key only for provisioning and rotations. Do not give it to clinics. Each clinic token appears after provisioning and is stored as a DB hash.

Initial bootstrap

If you do not have a DB operator token yet, temporarily use ADMIN_TOKEN from .env for the first login. After DB generation, rotations no longer need a restart.

ADMIN_TOKEN=<bootstrap-operator-token>
ADMIN_TENANT=demo

2. Create the demo clinic

Creates services, staff, demo patients, seed appointments and an upsell rule. The code is shown once.

3. Generated code

Save the code now. It cannot be read again; rotate it if lost.

Telegram Secretary Mode

  1. Enable Secretary Mode for the bot in BotFather.
  2. The clinic connects the bot in Telegram Business.
  3. The clinic sends the demo code to the bot.
  4. The backend binds business_connection_id to the tenant and replies in Business chats.

Shared demo number

  1. Enable PHONE_DEMO_CHANNEL_ENABLED and configure the provider webhook.
  2. The first clinic/patient message includes the demo code.
  3. The backend stores from -> tenant for following messages.

Existing demo tenants

No demo tenants yet or the token has no access.