KamoCRM

Per-integration public AI prompt + session attribution

FeatureAIService
Shipped
16 ஜூலை, 2026 அன்று 2:42 AM UTC
Author
Kamo
Commit
e3bf921

Upgrade the public-chat system-prompt waterfall from per-org to per-integration: PublicAiChatController now reads the X-Public-Chat-Key-Hash header (nullable) forwarded by APIService and passes it to **************** which resolves the WebChatIntegration by hash and prefers its aiSystemPrompt over the AiOrgSettings default, falling back to the generic prompt. The resolved AiChatSession is also stamped with webChatIntegrationId for stable attribution that survives key rotation. Extracted the waterfall into a static, unit-tested resolvePrompt helper (integration-wins / org-fallback / generic-fallback / blank handling).

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing