AI & Agents · AI ERP & SaaS · Security & Compliance
Hybrid AI for Salesforce: Claude, ChatGPT & Private LLMs, One Router
By David Gadyan · Published · Updated
Use AI on Salesforce data without moving off Salesforce, overpaying for one model or leaking customer data. A router sends each request to Salesforce itself, Claude, ChatGPT or a private LLM inside the client's network, chosen by sensitivity, stakes and cost, and masks personal data before anything leaves. On top: an Apex and Flow review that returns fixed code and tests, a revenue agent that works dormant leads with fact-checked drafts, and a sandbox refresh and migration planner. Nothing is written to Salesforce until a person approves it.
The problem
Teams hiring for Salesforce and AI work keep describing the same problems. Legal worries that customer data will leak to an outside model. Finance worries about model bills and being locked into one vendor. Admins worry that AI-written Apex and Flows look fine and then break in production. Sales has thousands of old leads nobody works, and every sandbox refresh or org migration eats days of admin time.
This project answers each of those with something working, not slides.
The product in use
What I built
A router that decides where data may go. Every request is checked for sensitive fields. Medical and card data goes only to a model inside the client's network. The decision trace shows which policy matched and why.
Masking before anything leaves. Names, e-mails and phone numbers are replaced with tokens before Claude or ChatGPT see the record, then put back in the answer. Salesforce stays the system of record and the best model still does the job.
Cost decided on data, not a vendor pitch. A compare view runs the same record across every connected model, so the routing choice rests on real cost and quality. Adding or swapping a provider is a setting, not a rebuild.
Apex and Flow review that fixes the code. Fixed rules catch queries inside loops, missing sharing and field security, hard-coded IDs and keys. Claude then confirms each finding, adds the ones rules cannot see, and returns corrected code with a bulk test class.
Sandbox refreshes and migrations, planned. After a refresh someone has to mask personal data, point integrations at test endpoints, stop scheduled jobs and reload test data, usually from memory. The planner builds that checklist from the org's own metadata, orders the data seeding so lookups resolve, maps fields for an org-to-org move, reconciles record counts, and has Claude review the plan and write the runbook.
People stay in control. The revenue agent scores and tiers each lead, picks a next best action and drafts a short, specific e-mail. Any draft that cites something not in the CRM goes back for rewrite, and nothing is sent or updated until a person approves it. Every AI decision is logged.
Related projects
Virgil.ai: Agentic Health-Insurance Assistant
AI & Agents · AI ERP & SaaS · Cloud, DevOps & LLMOps · Security & Compliance
HubAIOps: HubSpot AI-Readiness Audit App with Claude-Written Plans
AI & Agents · AI ERP & SaaS · Full-Stack & UI/UX
Receptra: AI Voice Receptionist SaaS for Small Businesses
AI & Agents · AI ERP & SaaS · Full-Stack & UI/UX