CRMcy Docs

OpenAI

AI-assisted features — summarization, OCR, and reply suggestion.

Last updated 2026-05-05

The OpenAI integration powers a few targeted assists: ticket-thread summarization (a 3-sentence TL;DR on long threads), customer-facing reply drafting (ghost-text suggestions in the ticket reply box), receipt OCR (see Expenses), and proposal-section drafting. Configuration is opt-in per tenant: paste your OpenAI API key at Settings → AI, choose which surfaces are enabled, and the platform routes requests through the worker so your key never leaves the server.

Token usage is recorded per surface so finance can audit spend; a daily cap stops runaway usage in case of a misbehaving prompt.

Related endpoints

  • GET /api/tenant/ai/config — surface enable flags + monthly token usage.
  • PUT /api/tenant/ai/config — set api key + flags.
  • POST /api/tenant/ai/summarize-thread — run a one-off summary.
  • POST /api/tenant/ai/suggest-reply — generate a reply draft.

See the source at apps/web/src/app/(tenant)/settings/ai and apps/api/src/ai. Worker handlers at apps/worker/src/jobs/ai-*.ts.