Salesforce · AI Integration

Salesforce AI integration that respects who can see what

Salesforce AI integration connects AI models, assistants and agents, such as Claude, ChatGPT, OpenAI models and Agentforce, to the customer data and actions in your Salesforce CRM. Twopir Consulting designs and builds that connection: hosted MCP servers, Agentforce actions, APIs, Apex, Flow or MuleSoft, with OAuth, sharing rules, field-level security, approvals and an audit trail in place before the first record changes. AI that reads and updates your CRM only as far as the user it acts for is allowed to.

AI Connection Map
AI CLIENTS AI Assistants Claude · ChatGPT · Copilots Agentforce Agents Topics · Actions · Prompts OpenAI API Claude API Custom Agents TWOPIR CONNECTION LAYER Connect Hosted MCP · APIs MuleSoft · Apex · Flow Secure OAuth · Scopes Sharing · FLS Govern Approvals · Audit Monitoring USER CONTEXT · LEAST PRIVILEGE · NO WRITE WITHOUT A RULE 2πr INSIDE YOUR SALESFORCE ORG Grounded Answers Accounts, deals and cases, read in context Approved Updates Record changes that are confirmed, logged Sales Work Done Tasks, follow-ups and next steps DISCOVER · DESIGN · CONNECT · SECURE · TEST · OPERATE
500+
Clients Served Across Global Markets
12+
Years of Salesforce & HubSpot delivery
10+
Countries Served
15+
Certified Platform Partnerships

Trusted by 500+ organizations, from growing and mid-market companies to enterprise teams, running Salesforce with Twopir Consulting.

Mitratech
LegalZoom
Platform9
Spinify
Kacific
Magnus Health
Amberscript
RChilli

What We Connect

  • Salesforce Partner
  • AI Delivery
  • Agentforce
  • Hosted MCP Servers
  • MuleSoft
  • OpenAI
  • Anthropic Claude
  • Apex & Flow
Definition

Salesforce AI integration, defined

Salesforce AI integration is the work of letting an AI model, assistant or agent read Salesforce data and take Salesforce actions, under the same security rules that govern your people. It covers choosing how the AI connects (Salesforce Hosted MCP Servers, Agentforce, the Salesforce APIs, Apex and Flow, or MuleSoft), how it authenticates, whose identity it acts as, which records and fields it can reach, which changes need a human to approve them, and how every action is logged.

Three parties are involved, and it helps to keep them apart. Salesforce provides the platform pieces: hosted MCP servers, Agentforce, the APIs, External Client Apps for OAuth, and the sharing and field-level security model. The AI vendor, such as Anthropic for Claude or OpenAI for ChatGPT and the OpenAI API, provides the model and the client your people use. Twopir Consulting designs and builds the connection between them: the architecture, configuration, custom tools, access design, testing and handover described on this page. Salesforce documents the hosted servers in its Hosted MCP Servers developer guide.

This page is about Salesforce specifically. If the AI also has to reach HubSpot, NetSuite or other systems, start with our AI integration services. If what you need is an Agentforce agent built inside Salesforce, see AI agents for Salesforce, and for the wider strategy question, AI in Salesforce.

Last updated 26 November 2026. Salesforce's MCP and Agentforce features change quickly, so we re-check the platform details on this page against Salesforce's documentation every quarter.

Where It Goes Wrong

The model works. The connection is the risk.

Getting an AI assistant to answer a question about an account takes an afternoon. The problems surface later, when the pilot meets your permission model, your data and your auditors. These are the six we design out first.

One integration user that sees everything

A shared admin-level login is the quickest way to make a demo work. It also means every person using the AI can read whatever that login can, whatever their own access says.

Write access before anyone defined the writes

Full create, update and delete tools get switched on because they were in the list. Nobody decided which fields the AI may change, on which records, or which changes a person should confirm first.

The AI reads an org nobody has cleaned

Duplicate accounts, stale opportunities and fields that mean different things to different teams. The AI summarizes them fluently, and the answer is confidently wrong.

Record text treated as instructions

Case descriptions, emails and notes come from outside the company. If an AI with write access reads them without guardrails, a sentence in a customer email can steer what it does next.

Too many tools, chosen badly

An assistant offered every object and every action picks the wrong one. Tool names and descriptions written for developers, not for a model, send requests to the wrong place.

Nobody can say what the AI changed

When security or finance asks who updated a record and why, "the AI did it" is not an answer. Without user attribution and monitoring, the pilot does not survive its first review.

Use Cases

What connected AI does inside your CRM

Most programmes start with the same six jobs. We design each one as what the AI reads, what it may write, and who confirms the change, because that is what decides the connection pattern and the controls.

Retrieve Customer Information

A rep asks Claude or ChatGPT about an account and gets the answer from live Salesforce records, limited to what that rep is allowed to see.

  • Accounts, contacts, cases and open deals
  • Queries and search across standard and custom objects
  • Read-only server for answer-only use cases
  • Named Queries where the slice must be fixed

Summarize Opportunities & Accounts

Deal briefs, account summaries and pre-meeting talking points, generated from opportunity history, activity and contacts rather than pasted into a chat window.

  • Opportunity and pipeline summaries
  • Meeting prep from recent activity
  • Prompt Builder templates run server-side
  • Consistent format your managers can review

Update CRM Records

The AI proposes the change, such as a stage, a next step or a contact role, and it is written only where the user has edit rights and the rule allows it.

  • Create and update without delete, by default
  • Field-level limits on what may change
  • Confirmation before a write is applied
  • Validation rules and automation still fire

Automate Sales Activities

Logging meeting notes as activities, creating follow-up tasks, drafting emails from the opportunity and moving the work forward through the Flows you already run.

  • Activity logging from meeting notes
  • Follow-up tasks and reminders
  • Email drafts grounded in the deal
  • Existing Flows exposed as tools

Delegate to Agentforce

An outside assistant hands a specialist task, such as case triage or renewal analysis, to an Agentforce agent you built in Salesforce, instead of rebuilding that logic itself.

  • Agentforce agents exposed as tools
  • One tool per task, clearly described
  • Agent instructions and knowledge reused
  • Runs in the signed-in user's context

Connect External AI Applications

Your own AI product, an internal copilot or a Salesforce process that calls a model: the integration runs both ways, from AI into Salesforce and from Salesforce out to a model.

  • Apps on the OpenAI or Claude APIs
  • OAuth-secured access to the Salesforce APIs
  • Apex and Flow callouts via Named Credentials
  • MuleSoft where other systems are involved
Connection Options

Five ways to connect AI with Salesforce

There is no single right connection. The choice depends on which direction the work flows, whether a person is in the loop, and what else the AI has to reach. Many organizations end up with two of these side by side.

We choose the pattern per use case in the connection design, and record why.
PatternHow it worksBest whenWhat to plan for
Salesforce Hosted MCP ServersSalesforce runs the MCP server. An MCP client such as Claude, ChatGPT or a custom agent connects with per-user OAuth through an External Client App, and calls standard tools (record reads, writes, queries) or custom tools you curate.People already work in an AI assistant and need it to answer from, and act on, Salesforce as themselves.Servers are off until an admin enables them; usage is tied to Flex Credits; tool sets must be curated per persona.
AgentforceAgents built in Salesforce act through custom actions backed by Apex, Flow and prompt templates, on models that include Claude through Amazon Bedrock. Allowlisted tools from registered MCP servers can become agent actions, and agents can be exposed to outside assistants as MCP tools.The AI should live inside Salesforce, in the flow of work or on a customer channel, with Salesforce's own guardrails.Agentforce licensing, grounding data, and action design. Covered in depth on our Agentforce development page.
Salesforce APIs with OAuthYour application or agent calls the Salesforce REST APIs directly, authenticated through an OAuth flow that matches who is acting: a signed-in user, or a scoped integration user.You are building your own AI product or backend service and need full control of the calls it makes.The identity model, API limits, and the guardrails you would otherwise get from a hosted server.
Apex and Flow calling a modelSalesforce calls the OpenAI or Anthropic API from Apex or Flow, with credentials held in Named Credentials, or uses Salesforce's Models API to reach partner models, then writes the result back to the record.A Salesforce process needs a model step: classify a case, summarize an email, extract fields from a document.What data leaves the org, callout limits, error handling, and how outputs are reviewed before they matter.
MuleSoftMuleSoft APIs sit between the AI and several systems. The Anypoint Connector for MCP connects AI applications to those APIs, so one governed layer serves Salesforce, ERP and the rest.The AI needs Salesforce plus an ERP, billing or legacy system, and you want one governed API layer rather than several direct connections.MuleSoft licensing and API design. See our MuleSoft integration work.
Security & Governance

AI that acts as the user, never above them

The safest Salesforce AI integration adds no new permission model. It reuses the one you already maintain, then adds the controls AI needs on top: narrower tools, approvals before changes, and a trail a reviewer can follow.

ControlHow we configure it
Authentication and OAuthAn External Client App per AI client, with only the scopes it needs. Hosted MCP Servers use the OAuth authorization code flow with PKCE, so every session belongs to a named user; there is no headless service-account path.
Who may connectThe External Client App limited to a permission set, IP ranges where the client allows it, short refresh-token validity with rotation, and single logout so revoking a Salesforce session ends the AI session too.
Record-level accessOrganization-wide defaults, role hierarchy and sharing rules apply to every call made in the user's context. We test with users from different roles to prove the AI cannot see what they cannot.
Field-level securityObject permissions and field-level security limit what the AI reads and writes. Sensitive fields stay hidden from users, and therefore from the AI acting for them.
Tool scopeA read-only server where answers are enough, custom servers curated per persona, Named Queries for fixed data slices, and Apex or Flow tools where business rules must be enforced in code.
Human approvalClient-side confirmation before a write is applied, and Salesforce approval processes or Flow-based review steps for changes that carry commercial or compliance risk.
AuditabilityHosted MCP actions appear in Salesforce API logs attributed to the named user, and can be filtered as MCP traffic. We add field history on the fields the AI may change, and monitoring on refused and unusual activity.
Integration Architecture

What moves between AI and Salesforce

Each connection has a direction, a business purpose and a team that relies on it. These are the ones we build most often, and what actually flows across each.

Claude + Salesforce

Claude connects to a Salesforce hosted MCP server as a custom connector. Questions go out as tool calls; records, query results and confirmed updates come back, all as the signed-in user.

ChatGPT + Salesforce

On ChatGPT Business and Enterprise plans, an admin adds the same hosted servers as a custom app, with a user-defined OAuth client. Sales teams get CRM answers inside the assistant they already use.

OpenAI or Claude API + Salesforce APIs

Your own application uses a model for reasoning and the Salesforce APIs for data: customer context in, generated summaries or structured updates out, under an OAuth identity you choose.

Salesforce Flow + an AI model

A record-triggered Flow or Apex sends an email, case or document to a model through a Named Credential and writes back the result for review. We built this for a US legal tech platform, turning email attachments into case notes with OpenAI GPT.

Outside assistant + Agentforce

An assistant in Slack, ChatGPT or Claude calls an Agentforce agent or a Prompt Builder template exposed as an MCP tool. The work runs in Salesforce, with the Einstein Trust Layer applied to the prompt.

Agentforce + external MCP servers

The reverse direction: an admin registers an outside MCP server and allowlists its tools, and each one becomes an Agentforce action, so an agent can reach a system that is not Salesforce.

MuleSoft + Salesforce + ERP

An AI request that needs an order, invoice or inventory figure goes through MuleSoft APIs, so the answer combines Salesforce and ERP data without giving the AI direct access to either.

AI + Data 360 and analytics

Standard hosted servers for Data 360 and Tableau Next let an assistant query unified customer data and KPIs, so revenue questions are answered from the governed numbers.

Configuration

Much of it is setup, not code

Enabling standard hosted servers, registering External Client Apps, curating a custom server for a sales persona, exposing an existing Flow, Prompt Builder template or Agentforce agent as a tool, and tightening OAuth policies are all done in Setup.

We deliver them that way, because configuration is what your admins can maintain.

Development

Code, when the rule cannot live in a permission

Invocable Apex that enforces a business rule before a write, an Apex REST endpoint for a composite action, a callout to a model with retry and redaction, or your own MCP server for a system Salesforce does not host.

That work follows Salesforce patterns: bulk-safe, sharing-enforced, tested, and described for the model that will call it.

Delivery Process

Six phases from use case to a governed connection

We start with one use case that matters, prove it read-only, and widen access only when the controls around it have been tested. The connection pattern is chosen in design, not assumed in the sales call.

Phase 01

Use-Case Discovery

We agree which questions the AI should answer and which actions it may take, for which users, and how success is measured. Every use case is written as data it reads, data it writes and who approves.

DeliverablePrioritized use cases and a success baseline

Phase 02

Org & Data Readiness

We review the objects, fields, sharing model, permission sets and data quality the use cases depend on. AI exposes a messy org faster than any report does, so gaps are fixed or scoped out here.

DeliverableReadiness findings and fix list

Phase 03

Connection Design

The pattern for each use case (hosted MCP server, Agentforce action, API, Apex or Flow callout, MuleSoft), the authentication flow, the identity the AI acts as, and the approval and logging rules.

DeliverableSigned-off architecture and access design

Phase 04

Build in a Sandbox

App registration and OAuth, the tools or actions the AI may call, permission sets, approval steps, Named Credentials for outbound calls and the monitoring, built and demoed in a sandbox first.

DeliverableWorking connection in a sandbox

Phase 05

Test & Validate

We test as real users with different roles: what each can and cannot see, what happens when a write is refused, how the AI handles instructions hidden in record text, and whether every change is traceable.

DeliverablePassed access and behaviour test plan

Phase 06

Pilot, Launch & Operate

A pilot group first, then wider rollout. We watch usage, refused actions, API consumption and answer quality, then hand over documentation your admins can maintain, or stay on for support.

DeliverableLive rollout, runbook and support plan

Why Twopir

Salesforce architects who connect AI safely

Connecting a model is the easy part. Making it safe in an org with years of sharing rules, automation and integrations is a Salesforce architecture job, and that is the work we have always done.

The architecture comes first

We decide the identity, the access model and the connection pattern before any tool is switched on, so the integration fits your CRM and revenue architecture instead of working around it.

Salesforce-first, with the platforms around it

We know the sharing model, Flow, Apex and Agentforce from the inside, and we connect HubSpot and the other platforms you run when the AI has to reach beyond Salesforce.

Built for multi-system complexity

AI is one more integration in a stack that already has ERP, billing and middleware. We design it with the same discipline: named data flows, failure paths and owners.

Real implementation experience

Our work spans industries and markets, which is why we test AI against the messy data and permission edge cases real orgs have, not a clean demo org.

Senior-led, specialist delivery

Senior Salesforce architects lead the design and specialists build it. You get documentation your admins can maintain, and governance and security support when you need it.

Common Questions

Salesforce AI integration questions, answered plainly

Salesforce AI integration connects an AI model, assistant or agent to Salesforce so it can read CRM data and take CRM actions under your existing security rules. The connection can run through Salesforce Hosted MCP Servers, Agentforce, the Salesforce APIs, Apex and Flow, or MuleSoft. Twopir Consulting designs and builds that connection, including authentication, access, approvals and audit.

Yes. Salesforce Hosted MCP Servers let MCP clients such as Claude and ChatGPT connect to a Salesforce org. An administrator enables the servers, which are off by default, and registers an External Client App for OAuth; each user then signs in, and the assistant acts with that user's permissions. Claude adds the server as a custom connector; in ChatGPT, custom MCP apps are available on Business and Enterprise plans and are added by an admin. Salesforce intends Hosted MCP Servers for customers with Flex Credits, and usage may be billed.

With Salesforce Hosted MCP Servers, yes: every tool call runs as the user who authorized the connection, so object permissions, field-level security and sharing rules apply, and actions are attributed to that user in Salesforce API logs. With a custom API integration, it depends on the identity the integration uses, which is why we design that identity first and test it with users from different roles.

Use Hosted MCP Servers when people already work in an AI assistant and need it to use Salesforce as themselves. Use Agentforce when the AI should live inside Salesforce or on a customer channel. Use the Salesforce APIs when you are building your own AI application, Apex or Flow callouts when a Salesforce process needs a model step, and MuleSoft when the AI must reach other systems as well. Many organizations combine two of these.

Yes, when writes are designed rather than switched on. We start read-only, add create and update tools only for named use cases, keep delete tools off by default, limit the fields the AI may change through permissions, and require a person to confirm changes that affect customers, forecasts or invoices. Validation rules and existing automation still run on every change, and field history records what changed.

No. Claude, ChatGPT and other MCP clients can connect through Salesforce Hosted MCP Servers, and your own application can use the OpenAI or Claude API alongside the Salesforce APIs. Agentforce is the right choice when you want agents built and run inside Salesforce, and an Agentforce agent can also be exposed as a tool to an outside assistant.

Use-case discovery, a readiness review of your data, sharing model and permissions, connection and access design, a sandbox build, testing with real user roles, then a pilot and wider rollout with monitoring. The size of the project depends mainly on how many use cases write data, how clean the underlying data is, whether custom Apex tools are needed, and whether systems beyond Salesforce are involved. We scope it in discovery before any statement of work.

Next Step

Start with one use case, we design the rest

A first conversation covers the AI tools your teams use, the Salesforce data and actions they need, and your security requirements: enough to say which connection pattern fits, what has to be ready in your org, and what the work would take. No obligation to proceed.

Talk to a Salesforce architect who connects AI to CRM