Claude Templates / A-tier · High leverage

Admin & Ops

The Support Inbox Playbook

In-app ticketing and a shared inbox: no third-party helpdesk.

SUPPORT-INBOX-PLAYBOOK.md · 9 sections · 4,911 words · 41 KB · markdown

By Moe Ameen, founder of BILT · Published · Updated

The Support Inbox Playbook builds a help desk inside your own admin console. Postmark's inbound webhook turns emails to support@ into tickets with global numbers, threads replies by subject tag, then In-Reply-To headers, then fuzzy match, and reopens resolved tickets on a new reply. One conversation spine also backs sales leads and personal team mailboxes, with realtime toasts, unread badges and search.

Key takeaways

  • Inbound email becomes a ticket via a Postmark webhook.
  • Threading tries a subject tag, then email headers, then a fuzzy match.
  • A reply to a resolved ticket reopens it automatically.
  • The same tables power support, sales leads and personal mailboxes.

A full support desk inside your own admin console. Inbound email webhook to ticket threading with global ticket numbers, a conversation spine that also carries internal notes and personal mailboxes, threaded outbound replies, unread tracking, realtime toasts, full-text search, and answer suggestions from resolved tickets.

What does the Support Inbox Playbook build?

It builds the schema, email helpers, inbound route and operator UI for ticketing, with per-mailbox row-level security and attachments in a private bucket.

The file ends with an adaptation checklist and a list of non-obvious rules learned while building it.

When should you build your own support inbox?

Build it in weeks 3-4, after Email Infrastructure and the admin shell exist. It pays off when you want customer context and support in the same console.

If you need SLAs, macros and a large team on day one, a hosted help desk is quicker.

What do you need first?

You need Email Infrastructure (Postmark inbound parsing) and the Admin Console, plus DNS for your support address.

Decide your mailbox kinds up front: support, billing, sales, info or personal.

What's inside

What does the playbook give you?

When to use it

Weeks 3-4, after email infrastructure and the admin shell.

Straight from the file

What does the writing look like?

The system is one conversation spine reused by three parent types. Support tickets are the primary one; the same mailboxes + conversation_messages + conversation_events + conversation_attachments tables also back leads (sales pipeline) and mail_threads (free-form personal team email). This playbook documents the support-ticket path end to end and notes where the spine is shared, so you can ship tickets alone and add leads/personal-mail later without re-architecting.

Table of contents

Which sections does the file cover?

  1. 0. Architecture in one breath
  2. 1. Database schema (the canonical DDL)
  3. 2. Email helper libraries (src/lib/email/)
  4. 3. Inbound webhook — POST /api/email/inbound (runtime='nodejs')
  5. 4. Operator-facing API + UI
  6. 5. Env vars + external setup
  7. 6. Adaptation checklist (per new app)
  8. 7. Build order (slices — pause after each per planning rules)
  9. 8. Hard-won rules (bake these in — they are non-obvious)

How do you run it?

Drop SUPPORT-INBOX-PLAYBOOK.md into your repo, then tell Claude Code: “Read SUPPORT-INBOX-PLAYBOOK.md and implement it in this codebase.” It's written for an agent to execute end to end. Search the file for angle-bracket placeholders and swap in your own project names, domains, and keys before the first run.

↓ Download the playbook

Who is this for, and who should skip it?

Best for

  • Founder-led support on a small team
  • Apps already sending through Postmark
  • Teams that want tickets next to customer and billing data

Not ideal for

  • Large support teams needing SLAs and workforce tools
  • Apps not using Postmark for inbound mail
  • Products that handle support only in chat
  • Builders who won't adapt paths: the file points to a reference app you won't have

What else do people ask?

Does the Support Inbox Playbook work with an email provider other than Postmark?

The Support Inbox Playbook is built around Postmark: its inbound parse webhook with HTTP Basic auth, the sendThreadedReply helper and the inbound stream setup. It doesn't describe another provider.

Can I build only support tickets and skip leads and personal mailboxes?

Yes. The Support Inbox Playbook says a tickets-only build can trim the message and event RLS policies to the ticket branch and narrow the parent_type checks to 'ticket'. When you add leads or mail threads later, recreate each whole policy instead of patching one branch, because a missing branch fails silently.

What do I rename when adapting it to my app?

The Support Inbox Playbook's adaptation checklist covers TICKET_PREFIX in format.ts and the KOMP literal in its two regexes, the 'KOMP-' literal in the tickets.search_tsv expression, every yourapp.com, and the <FOUNDER_AUTH_UID> placeholder in the mailbox access seed.

What is in the Support Inbox Playbook download?

The Support Inbox Playbook is a markdown file of about 4,900 words. It has full SQL for the mailboxes, tickets and conversation tables with RLS, two SQL functions and a mailbox seed, TypeScript for ticket formatting, HTML sanitizing and the unread check, a 13-step inbound webhook algorithm, an env-var list and a seven-slice build order.

Does it close old tickets automatically?

Not in the reference build. The Support Inbox Playbook's UI can show an auto_closed event, but no cron emits one, and the file suggests a daily Trigger.dev task to close resolved tickets after N days if you want it. Auto-reopen when a customer replies to a resolved ticket does work in the inbound webhook.

How do we know this?

This page is based on the playbook file itself, SUPPORT-INBOX-PLAYBOOK.md, which Moe Ameen wrote from the Kompozy codebase (called BKE in the file). We read the file on November 4, 2026; the facts here come from it, not from independent testing in other codebases.

More admin & ops playbooks

← All 28 Claude templates