# Agents inside your Salesforce org

> AI agents for Salesforce: case triage, lead routing and opportunity hygiene on the REST API, started by Platform Events or Flow, with approvals on the record.

Canonical page: https://aispeedforce.com/platforms/salesforce/

Last updated: 2026-09-23

Salesforce gives an agent the REST API, SOQL for reads, and Platform Events and Flow for triggers. We build the agent as a connected app with the narrowest permissions its task needs, and route its writes through an approval process on the record.

## Three agents that work inside your org's rules

Each one does a single job. It reads with SOQL, writes through the REST API, and respects the sharing rules and validation rules your org already has.

### Case triage

Reads new cases with the account and contact history, sets type and priority, and drafts a response for the owner.

- **Touches**: Case, Account, Contact, SOQL
- **Human gate**: Every customer response.

### Lead routing

Reads new leads, enriches them from your own data, scores them against your criteria and prepares the assignment.

- **Touches**: Lead, Account, Task
- **Human gate**: Assignments outside your routing rules.

### Opportunity hygiene

Finds opportunities with stale stages, missing close dates or no next step, and prepares updates and follow-up tasks.

- **Touches**: Opportunity, Task, SOQL
- **Human gate**: Stage and amount changes.

## What it connects to

Five surfaces, all standard Salesforce. The agent is a connected app, so its access follows the permission set you assign to it.

- **REST API**: The write surface. Records are created and updated through one tool per object and operation, and validation rules still apply.
- **SOQL**: The read surface. Queries are built per task, so the agent reads the fields it needs and nothing else.
- **Platform Events**: Your org publishes an event and the agent starts a run, without polling.
- **Flow**: A Flow can publish that event, so admins start agent work from the automation tool they already maintain.
- **Approvals**: The gate. A held change is submitted to an approval process on the record, so it is reviewed where your team already approves things.

### What each agent reads and writes

Read access is broad enough to answer the question, write access is narrow, and every write has a gate until you decide otherwise.

| Agent | Reads | Writes | Human gate |
|---|---|---|---|
| Case triage | `Case`, `Account`, `Contact` | Type, priority, drafted response | Every customer response |
| Lead routing | `Lead`, your enrichment data | Score fields, owner | Out-of-rule assignments |
| Opportunity hygiene | `Opportunity`, activity | Fields, `Task` | Stage and amount changes |

## Approvals run through Salesforce approval processes

A held change is submitted for approval on the record it would change, so it uses the approvers, queues and history your org already trusts.

**Where it sits**: On the record, through a standard approval process. Approvers see it in their usual approval list, on desktop or mobile.

**What a reviewer sees**: The proposed field changes, the record they apply to, and a link to the run trace with the reads and reasoning behind them.

**What waits by default**: Every customer response, stage and amount changes on opportunities, and lead assignments that fall outside your routing rules.

**What a rejection does**: The run stops, the rejection is recorded with its trace, and it becomes an eval case the agent is tested against on every change.

## Questions Salesforce teams ask first

### Does the agent bypass our validation rules or sharing?

No. It writes through the REST API as its own integration user, so validation rules apply and it only sees what its permission set allows.

### Do you build inside Salesforce with Apex?

Only where a trigger or a small piece of logic has to live in the org. Most of the agent runs outside Salesforce and talks to it through the APIs.

### Can we start with a sandbox?

Yes, and we recommend it. The agent is built and tested against a sandbox, with the eval suite run there, before it touches production.

### Where to go next

- [Agent engineering](https://aispeedforce.com/services/agent-engineering/)
- [Retrieval and data](https://aispeedforce.com/services/retrieval-and-data/)
- [HubSpot agents](https://aispeedforce.com/platforms/hubspot/)
- [All platforms](https://aispeedforce.com/platforms/)
- [Contact](https://aispeedforce.com/contact/)

## Name one job in your Salesforce org

Tell us the case, lead or opportunity task your team repeats. We will tell you which objects the agent would read, what it would write, and which approval process it would use.
