# What an AI agent can and can't roll back in Salesforce

Systems · Salesforce · 2026-11-19 · By Backa · https://backa.ai/articles/salesforce-rollback/

Salesforce is where many companies keep their most valuable data: every account, contact and opportunity, often years of it. Here is what an AI agent can do there through Backa, how each change is rolled back, and the two places where Salesforce itself sets the limits.

## The short answer

An agent connected to Salesforce through Backa can query and read any record you can see, and make three kinds of changes. All three can be rolled back.

  
- Query and read · SOQL queries and single records · · Nothing to roll back ·
  
- Create a record · Accounts, contacts, opportunities, cases, any object · · Deleted again ·
  
- Update a record · Any fields you can edit · · Old values rolled back ·
  
- Delete a record · It goes to Salesforce's Recycle Bin · · Restored, for 15 days ·

## When an agent updates a record

Before the update goes through, Backa reads the fields the agent is about to change and keeps their values. Rollback writes exactly those values back. Fields the agent didn't touch are left alone, so if a colleague changed the phone number while the agent changed the stage, rollback only rolls back the stage.

*Drawing: An opportunity record with six fields. The agent changed Stage and Amount; each carries a small paper tag with its old value. A colleague changed Phone, drawn in a different hand. Orange arrows return only the two tagged values.*

Rollback also looks first. If someone has changed one of those same fields since the agent did, rollback stops and tells you, instead of overwriting their work.

## When an agent deletes a record

A record deleted through the API goes to Salesforce's Recycle Bin, the same as when you delete it yourself. Rollback brings it back from there, with its original id, so links and reports that pointed at it keep working.

Salesforce deletes some records together. Delete an account and its contacts and opportunities go with it. Rollback brings those back too, in one step.

The Recycle Bin is where the limit sits. Salesforce empties it after 15 days, and an admin can empty it sooner. So deletes can be rolled back for 15 days, not 30, and Backa tells you if the record is no longer in the bin.

## When an agent creates a record

Rollback deletes the new record again, so it goes to the Recycle Bin. If someone has worked on the record since, rollback stops and asks instead, because deleting it would throw their work away.

## Flows and triggers

This is the part to know before you give an agent real work. Salesforce orgs are full of automation: flows, Apex triggers, assignment rules, approval processes. When an agent changes a record, that automation runs, exactly as it would if a person had made the change.

Backa can roll back the agent's change. It can't roll back what your automation did because of it. If changing an opportunity to Closed Won starts a flow that creates an invoice task and emails the customer, rollback puts the stage back, but the task and the email are already out.

*Drawing: A row of dominoes. The first is labelled the agent's change, then a flow, then a task, then an email to the customer, all fallen. An orange arrow sets the first domino upright again; the others stay down.*

Two things help. Run a test with the agent in a sandbox org first, so you see what your automation does. And look at which of your flows send email or call other systems. Those are the ones where a wrong change costs more than a click to fix.

## How long you have

Creates and updates can be rolled back for 30 days, deletes for 15, one change at a time or a whole run, newest first. After that, every change stays in the audit log, so you can still see what happened and who asked for it.

Backa is the reversibility layer for AI agents: https://backa.ai
