AI support triage for D2C brands · 2026
Triage Desk
Live demo of AI customer support for several brands: n8n ingests messages, a Claude agent in a Supabase Edge Function drafts replies with policy and catalog sub-agents, and staff approve them in Next.js. Brand data is isolated with Postgres RLS and pgTAP tests.
- Orchestrator agent with strict tools, structured outputs and prompt caching; about 20 seconds and US$0.03 per ticket.
- Idempotent ingestion, HMAC verified Shopify order sync, a backlog sweep and an error workflow in n8n.
- Public demo with a daily reset and a cap on re-runs; a technical design document in the repository.
- Five n8n workflows: inbound message (secret check, idempotent store, triage), approved reply (a pg_net trigger and SMTP), Shopify order sync (HMAC verified), a backlog sweep every 5 minutes and an error handler that writes to automation_errors.
- Postgres security: RLS by brand membership with security definer helpers, column grants so staff cannot touch AI fields, a guard trigger on status changes, RPCs only the service role can call, and 14 pgTAP tests.
- Verified run: 10 real tickets (order status, damage past the window, sizing, an address change, a return without the box, spam, a message in Spanish) triaged with the expected decision in about 20 seconds each.
- Claude API
- Supabase
- PostgreSQL RLS
- Edge Functions
- n8n
- Next.js
- Vercel
- pgTAP