Migration run against the main data table when the project is imported.
| Column | Type | Constraints |
|---|---|---|
| id | uuid | not nullprimary keydefault gen_random_uuid() |
| subject | text | not null |
| requester_email | text | not null |
| requester_name | text | |
| status | text | not nulldefault 'open'::text |
| created_at | timestamp with time zone | default now() |
| updated_at | timestamp with time zone | default now() |
| last_message_at | timestamp with time zone | default now() |
| archived | boolean | not nulldefault false |
| Column | Type | Constraints |
|---|---|---|
| id | uuid | not nullprimary keydefault gen_random_uuid() |
| ticket_id | uuid | not null→ helpdesk.tickets |
| direction | text | not null |
| from_email | text | |
| from_name | text | |
| body | text | not null |
| created_at | timestamp with time zone | default now() |
| email_message_id | text |
A minimal Zendesk: inbound email becomes a ticket, replies thread onto it, and agents work the queue from a dashboard app.
helpdesk_inbound.ts Email-trigger handler (preprocessor + upsert ticket)
helpdesk_inbound.email_trigger.yaml
helpdesk_list_tickets.ts Queue, optional status filter, most recent first
helpdesk_get_ticket.ts One ticket + its full message thread
helpdesk_reply.ts Agent reply over SMTP, appended to the thread
helpdesk_update_status.ts open / pending / closed
helpdesk_set_archived.ts Archive toggle (archived tickets leave the queue)
helpdesk_dashboard__raw_app/ Support inbox UI
support@<workspace>....helpdesk_inbound; the preprocessor normalizes the message.main finds an existing thread (or opens a new ticket) and appends the message.helpdesk_reply sends over SMTP and
records the outbound message on the same thread.wmill script preview f/helpdesk/helpdesk_list_tickets -d '{"status":"open"}'