Major

Salesforce AI Agents: 5 Workflows Beyond Agentforce

Agentforce isn't the only way to put an AI agent on Salesforce. Here's how to build one over the REST API, joining pipeline, Gong calls, and Slack to flag at-risk deals and draft follow-ups, with a human approving every send.

Jose GironUpdated
Sales manager presenting pipeline numbers on a screen to his team, the kind of review a Salesforce AI agent can prep

How do you build a Salesforce AI agent?

Build it outside the CRM, over the Salesforce REST API, and route every write through a typed, audited app. The agent reads Opportunities with SOQL, joins signal Salesforce doesn't hold (Gong call sentiment, Slack approvals), decides what needs attention, and hands the actual write-back to deterministic code. Agentforce keeps its agent inside Salesforce; an agent that spans Gong, Slack and Salesforce needs a layer that sits above all three.

That layer is where Major fits. Major is the enterprise platform where agents build the software they run on. The agent works out the repeatable part of the job once, builds an app for it, and runs the app from then on. The model keeps the judgment calls: which deals look at risk, what the follow-up should say. The app handles the SOQL batching, the Task and Chatter writes, and the logging, the same way on every run.

This guide is for RevOps and sales-ops owners who want an agent doing real work on the pipeline, and for the IT team that has to sign off on it.

Where an agent over Salesforce earns its place

If everything the agent needs lives inside Salesforce, a Flow often does the job. The case for an external agent starts when the record is in Salesforce but the signal, or the action, lives somewhere else. Five workflows that cross that boundary:

  • Opportunity-lifecycle agent. Flags open deals by combining stage age, activity and call sentiment, then drafts an AE follow-up. Connectors: Salesforce, Gong, Slack.
  • Lead scoring agent. Reads new Leads and recent touches, scores fit and intent, writes a priority back for routing. Connectors: Salesforce plus an enrichment source.
  • Pipeline digest. Every morning, summarizes what moved and what slipped and posts it to a RevOps channel. Connectors: Salesforce, Slack.
  • Account research agent. Before a QBR or renewal, assembles account history and recent calls into a briefing for the owner. Connectors: Salesforce, Gong.
  • Close nudge agent. Watches late-stage Opportunities and drafts a reminder about missing steps for the owner to approve. Connectors: Salesforce, Slack.

All five share one trait. The expensive reasoning happens on a small slice of the data, and everything around it (pulling, batching, writing, logging) is repeatable. That repeatable part is what should become an app.

What the Salesforce REST API gives you

Authentication is OAuth 2.0 through a connected app, so the agent never holds a raw password. Every standard and custom object (Opportunity, Account, Lead, Task) is an SObject with create, read, update and delete endpoints on individual records.

To read across records, use SOQL through the query endpoint. When you need several operations in one round trip, the Composite resources batch them or chain dependent ones in a single call. Before a run, check the /limits endpoint, which reports the org's remaining API allocation so the agent can back off before it hits a wall.

Two constraints will shape your design. First, most off-the-shelf Salesforce triggers are polling-based, so your agent reacts on an interval, not instantly. State the cadence and schedule it deliberately. Second, Enterprise Edition starts at 100,000 API requests per rolling 24 hours and scales with licenses, and each transaction is capped at 100 SOQL queries and 150 DML statements. Batch with SOQL and Composite. Verify current figures for your edition in Salesforce's own REST API documentation.

Build the Opportunity-lifecycle agent on Major

Here is the full build for the first workflow, with the pieces named.

  1. Connectors. Salesforce, Gong and Slack are configured once at the org level by IT. Credentials live in one place, so a rotate or revoke applies everywhere. Salesforce uses run-as-invoker OAuth, so Salesforce sees the identity of the person who started the run.
  2. The app that holds state. A "Deal Watch" app with a managed database stores each flagged Opportunity, the signals behind the flag, the drafted follow-up, and the approval outcome. A rerun picks up where the last one stopped, and the history survives past any single conversation.
  3. The trigger. A weekday schedule at about 07:00 local fires the workflow. Salesforce is polled, so the schedule is the trigger.
  4. The deterministic steps. The app runs the SOQL pull for open Opportunities past a stage-age threshold, with their Account and recent Activity, in as few queries as possible. It then pulls recent call signals from Gong for those accounts. This is code, so it costs no reasoning tokens after the first build.
  5. The judgment. The agent weighs stage age, activity and call sentiment, decides which deals are at risk, and drafts a short follow-up and next step. This is the only part that needs the model.
  6. The approval gate. The agent posts a Slack card to the deal owner with the draft. The owner approves, edits or rejects.
  7. The write-back. Only after approval does the agent call a typed app action, "Log Opportunity Next-Step" (opportunity_id, next_step, due_date), which creates the Task and the Chatter note. The agent never writes to Salesforce directly. Nothing auto-sends.

Governance sits at the point where the agent acts. The app's Salesforce scope is read on Opportunity, Account and Activity, write on Task and Chatter only, no delete. Permissions are enforced on the query itself through role-based access. The app is versioned, so a bad change rolls back on one path, and every action lands as a logged entry you can export to your SIEM.

This is the reason to build it on Major rather than as a long prompt: the second morning's run is cheaper and steadier than the first, because the SOQL, the Gong pull and the write-back already exist as an app. The model is spent on the deals, not on rediscovering the plumbing. Harris Technology runs this class of cross-system reporting in production on Major, pulling from Salesforce and other systems for weekly sales meetings and quarterly business reviews, built and maintained by non-engineers.

Build your Salesforce agent on Major

Agentforce or your own agent?

Agentforce runs inside Salesforce and is configured with clicks and prompts. It suits conversational work that starts and ends in the CRM, and its identity and audit stay inside Salesforce.

An agent built on Major runs outside the CRM. It joins Opportunity data with Gong and Slack, runs on your schedule, and sends every write through an app you control. What you give up is the in-CRM chat surface. What you gain is cross-system reach, the deterministic app layer that makes the agent's work repeatable, and one identity and audit model across all three systems. For the revenue workflows above, Major is the stronger fit, because each one crosses a system boundary Salesforce doesn't own.

Start building on Major

Describe the Opportunity-lifecycle agent in plain language, connect Salesforce, Gong and Slack, and let Major build the Deal Watch app and the approval flow with scoped credentials and audit from the first run.

Related articles

Frequently asked questions

What is a Salesforce AI agent?
A Salesforce AI agent is software that uses a large language model to read Salesforce records, decide what to do, and act: scoring leads, summarizing opportunities, or drafting follow-ups. It reaches your data through Salesforce's built-in Agentforce or through the REST API. An agent built on Major runs outside the CRM, so it can join Opportunity data with Gong call signals, and its Salesforce writes go through a typed app.
Can you build a Salesforce AI agent without Agentforce?
Yes. You build against the Salesforce REST API: authenticate with OAuth 2.0 through a connected app, read records as SObjects, query with SOQL, batch with the Composite resources, and write back through the object endpoints. On Major, the agent calls Salesforce over a connector configured once at the org level, with run-as-invoker OAuth so Salesforce sees the identity of the person who started the run.
What can a Salesforce AI agent do?
It can score and route new Leads, summarize an Opportunity or Account for a rep, draft follow-up emails and Tasks, and flag at-risk deals by combining pipeline data with Gong call signals. On Major, the model weighs stage age, activity and call sentiment, then a typed app with inputs like opportunity_id and next_step performs the Task and Chatter write after a human approves.
Is Agentforce or a custom Salesforce agent better?
Agentforce fits workflows that start and end inside Salesforce. Once the agent has to reason across systems Salesforce does not own, such as Gong and Slack, an agent built on Major is the stronger fit: writes are app-mediated, every action is logged and exportable to a SIEM, and the repeatable steps run as code instead of fresh reasoning on every run.
How often can a Salesforce agent run against the API?
Cadence is bound by two limits. Enterprise Edition starts at 100,000 API requests per rolling 24-hour period and scales with licenses, and each transaction is capped at 100 SOQL queries and 150 DML statements. Most Salesforce triggers are polling-based, so state your interval, batch reads with SOQL and Composite, and check the /limits endpoint. Major keeps that batching and backoff in the app, so every scheduled run behaves the same.