Skip to main content

OpenAI and AI replies

NaviBot answers visitor messages through the backend AI dispatcher. The widget does not call OpenAI directly.

Required pieces

For AI replies to work:

  1. An OpenAI integration must exist.
  2. The website inbox must be connected to that OpenAI agent integration.
  3. The integration must have either:
    • customer-owned OpenAI API key, or
    • server-side OPENAI_API_KEY for managed mode.
  4. The conversation must not have botPaused = true.

Cabinet setup

Open:

/app/settings/bots

Then:

  1. Choose Customer key or Managed.
  2. Enter the OpenAI API key if using Customer key.
  3. Select model, embedding model, and temperature.
  4. Save OpenAI.

When OpenAI is saved, NaviBot connects website inboxes that do not already have an AI agent.

Why messages may not get answers

Most common reasons:

  • no OpenAI integration exists
  • inbox agentIntegrationId is empty
  • no OPENAI_API_KEY exists in managed mode
  • customer key is invalid
  • OpenAI API returns 401, 429, or quota error
  • the conversation is paused for human handling
  • the visitor message never reached /api/webhooks/widget/message

Backend diagnostics

Backend logs should show helpful messages:

AI dispatch skipped: inbox has no agent integration
AI dispatch skipped: conversation bot is paused
AI dispatch failed
OpenAI error
Security

OpenAI API keys must be stored in encrypted integration credentials or server environment variables. Do not place API keys in public widget config.