# Before an AI Agent Automates a Salesforce Process, Let the Team Flag What Breaks

> Source: <https://dev.to/juanma_garrido_1974/before-an-ai-agent-automates-a-salesforce-process-let-the-team-flag-what-breaks-2h1n>
> Published: 2026-11-29 17:08:18+00:00

**Recommendation:** Before automating a process with an agent, add a two-minute record-page flow that logs where the process breaks, then rank issues by summed weekly frequency to scope the agent.
More in the playbook "Designing agent systems": <https://wpnews.pro/playbooks/agent-architecture>

On LinkedIn I shared a story about a meeting with eight people. All eight knew the AI agent project on the table made no sense, and nobody said it. One of them had run that process for years, knew exactly where it broke, and had proposed a fix months earlier. Nobody listened, so this time he stayed quiet. A few months later the company had the same broken process, now automated with AI. I co-founded Vantegrate with Francisco Morales to build AI agents, and I run EGA Futura. The longer version, in Spanish, is on [EGA Futura Discover](https://discover.egafutura.com/obstaculos-humanos-transformacion-tecnologica-agente-de-ia/?utm_source=devto&utm_medium=referral&utm_campaign=amplify).

There is a technical side to this story. The people who run a process know where it breaks, but that knowledge rarely reaches the place where the agent gets designed. This post shows a small Salesforce setup that gives them a place to write it down in two minutes, from the record they are working on.

Create a custom object `Process_Issue__c` with these fields:

`Process__c` (Picklist): the process name, for example Order Approval, Returns or Invoice Correction.`Step__c` (Text, 80): the step where it breaks.`What_Happens__c` (Long Text Area): what the person has to do to work around it.`Times_Per_Week__c` (Number): their own estimate.`Related_Record_Id__c` (Text, 18): the record they were on.`Status__c` (Picklist): New, Reviewed, Fixed, Won't Fix.
Set the org-wide default to Public Read Only. People should see what others already reported, so they add to it instead of filing the same thing twice.

Build a Screen Flow with a text variable named `recordId`, marked Available for Input. When the flow runs from a quick action on a record page, Salesforce fills `recordId` with the current record Id.

`Process_Issue__c`, with `{!recordId}` and Then create an action of type Flow on each object where the process lives (Case, Order, Opportunity) and add it to the Lightning page or the page layout. One flow can serve all of them, since `Related_Record_Id__c` stores the Id as text.

Before anyone presents an agent, run this:

```
SELECT Process__c, Step__c, COUNT(Id) reports, SUM(Times_Per_Week__c) weeklyHits
FROM Process_Issue__c
WHERE Status__c = 'New'
GROUP BY Process__c, Step__c
ORDER BY SUM(Times_Per_Week__c) DESC
```

Long Text Area fields cannot be grouped, which is why the query groups by process and step and leaves `What_Happens__c` for reading. A summary report grouped by Process and Step gives the same view to a manager who does not write SOQL.

If you also want the process itself to live inside Salesforce, at EGA Futura we build a [native ERP for Salesforce](https://www.egafutura.com/erp/erp-para-salesforce), and at Vantegrate we build [turnkey AI agents for companies](https://vantegrate.com/).

The question I left on LinkedIn applies here too: how many times did your team agree with you simply because you were the boss?

Juan Manuel Garrido, co-founder of Vantegrate and founder of EGA Futura
