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:
- An OpenAI integration must exist.
- The website inbox must be connected to that OpenAI agent integration.
- The integration must have either:
- customer-owned OpenAI API key, or
- server-side
OPENAI_API_KEYfor managed mode.
- The conversation must not have
botPaused = true.
Cabinet setup
Open:
/app/settings/bots
Then:
- Choose
Customer keyorManaged. - Enter the OpenAI API key if using
Customer key. - Select model, embedding model, and temperature.
- 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
agentIntegrationIdis empty - no
OPENAI_API_KEYexists 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.