OpenAI Integration — Chat and text-enhancement flow
Understand exactly how prompts, the developer message, model selection, stored responses and HTML enhancement are processed.
01Use OpenAI through a core CRM AI actionRun a supported core AI action after configuring the provider.Open a CRM editor or AI-enabled feature → choose the configured AI action02Understand standard versus fine-tuned model selectionKnow which model is used for each request.Admin Area → Setup → Settings → AI → OpenAI03Understand the OpenAI chat message rolesReview the exact messages sent by the provider.Code-backed reference → OpenAiProvider::chat04Understand stored OpenAI chat responsesAccount for the store=true option in every normal chat request.Code-backed reference → OpenAiProvider::chat05Understand maximum-token handling in chat requestsConfirm how the configured numeric value is applied.Code-backed reference → OpenAiProvider constructor and chat06Understand response-choice handlingKnow which part of the provider response is returned to the CRM.Code-backed reference → OpenAiProvider::chat07Understand HTML code-fence strippingReview how a response wrapped in an html code fence is cleaned.Code-backed reference → OpenAiProvider::chat08Enhance CRM editor text with OpenAIUse the host AI enhancement action to request a more polite, formal or friendly result.Open an AI-enabled CRM TinyMCE editor → select text → AI enhancement action09Understand HTML-to-Markdown conversion before enhancementKnow how existing formatted content is prepared for the enhancement prompt.Code-backed reference → OpenAiProvider text-enhancement flow10Understand TinyMCE-compatible enhancement outputReview the expected output format and paragraph-wrapper handling.Open an AI-enabled TinyMCE editor → AI enhancement action11Extend AI text enhancement with the before_ai_tickets_enhance_text filterAlter the source text through the registered filter before it is sent.Development integration → hook before_ai_tickets_enhance_text12Troubleshoot an empty or malformed AI responseCheck credentials, model access, limits and first-choice content when no usable text is returned.Open the host CRM AI action and review application logs
