A Salesforce data retention policy sets how long each type of record is kept in Salesforce and what happens to it when that time runs out. Salesforce's own defaults are fairly short, since deleted records sit in the Recycle Bin for 15 days by default, and Setup changes are kept for at least 180 days.
Those defaults come from how each feature was built, not from your legal or business requirements. Your legal, security and business teams still have to agree on what to keep, for how long, and whether to archive or delete it at the end.
What is a Salesforce data retention policy?
A data retention policy is the document behind data lifecycle management, and it lists your data types, how long you keep each one and why. It also says what happens when that time is up, whether the records move to an archive or get deleted for good.
In Salesforce, the list usually runs object by object. Leads, Cases, Opportunities and each custom object get their own entry, and so do field history and the Setup Audit Trail.
Salesforce gives you the tools to apply the policy, but under its shared responsibility model, "customers are responsible for protecting their own data, configurations, and access rights." So the decisions, and the proof that your cleanup jobs ran, stay with your team.
How long does Salesforce keep data by default?
There's no single retention setting in Salesforce Setup that covers the whole org, because each feature keeps its data for a different length of time. The table below lists the defaults from Salesforce's documentation, and the sections under it link to each source.
| Data | Default retention | Notes |
|---|---|---|
| Deleted records in the Recycle Bin | 15 days by default | Salesforce Support can extend this to 30 days |
| Setup Audit Trail | At least the last 180 days | Changes made in your org's Setup area |
| Field History Tracking | 18 months in the UI, up to 24 months through the API | Up to 20 tracked fields per object |
| Field Audit Trail | Until you delete it | Up to 200 fields per object, with Shield or a Field Audit Trail license |
| Event Monitoring log files | 1 year by default | With Shield or the Event Monitoring Add-on; Developer and Trial orgs get 1 day |
| Data Export Service files | 48 hours | The zip files are deleted 48 hours after the email is sent |
| Customer data after the contract ends | 120 days in inactive status | Then deleted from production within 90 days and from backups within 180 days |
Recycle Bin
When a user deletes a record, Salesforce flags it as deleted and shows it in the Recycle Bin, a process its large data volumes guide calls soft deletion. Items stay there for 15 days by default, then Salesforce schedules them for hard deletion without guaranteeing the exact time.
A System Administrator can ask Salesforce Support to turn on Extended Recycle Bin Retention, which raises the window to 30 days. Records older than 15 days are only fully accessible in Salesforce Classic, as our Recycle Bin retention guide explains.
Field history and Field Audit Trail
Salesforce says field history data "is retained for 18 months in the Salesforce UI" and is available for up to 24 months through the API. Standard tracking covers up to 20 fields per object, according to the Field Audit Trail guide.
Field Audit Trail comes with Salesforce Shield or its own license, and it keeps history for up to 200 fields per object until you delete it. You set the window per object in a HistoryRetentionPolicy, and by default Salesforce archives data after 18 months in production and after one month in sandboxes.
Archived records of field changes are stored in the FieldHistoryArchive big object, which you reach through the API rather than the history related list. Our Field Audit Trail guide walks through the setup.
Setup Audit Trail and Event Monitoring
Salesforce's reference for the SetupAuditTrail object says it represents changes made in an org's Setup area "for at least the last 180 days." If your auditors want to see changes older than that, it's worth exporting the trail every month or quarter, as our audit trail compliance guide describes.
Deployments show up in Event Monitoring too, because MetadataApiOpEventLog "stores details of Metadata API retrieval and deployment requests." If you have Shield or the Event Monitoring Add-on, Salesforce keeps log files for 1 year after their CreatedDate by default and then deletes them, though an admin can change that in Event Monitoring Settings.
The same documentation adds a caveat: event log files aren't a system of record for user activity, since data can be lost during site switches or outages. If you need years of access history, keep a copy in storage you control.
Data after a contract ends
If you leave Salesforce, its Security, Privacy and Architecture documentation explains what happens next. Your data sits in inactive status for 120 days, and after that it's overwritten or deleted from production within 90 days and from backups within 180 days.
You have 30 days after termination to request a copy, which arrives as CSV files with attachments in their native format. Marketing Cloud works differently: for Marketing Cloud Engagement, subscriber and journey engagement data is now kept for 730 days.
Why do you need a data retention policy for Salesforce?
Some laws cap how long you can keep data, and the GDPR's storage limitation principle is one of them. Under it, personal data must be "kept in a form which permits identification of data subjects for no longer than is necessary" for its purpose.
Other laws set a minimum period instead, and HIPAA's Security Rule applies to both covered entities and business associates. They must keep the documentation it requires for 6 years from its creation or from the date it was last in effect, whichever is later.
Public companies have an audit rule to plan around as well. SEC Rule 2-06 has audit firms keep audit and review records for seven years after they conclude the audit.
Multi-year rules like this outlast Salesforce's own windows, so export or archive what your audits need before those windows close. Setup changes are only kept for at least 180 days, and standard field history for 18 months in the UI.
People in the EU can also ask you to delete their data under the GDPR's right to erasure. Your policy should say how you'd find one person's records across objects, files and backups, and our posts on GDPR backup requirements and HIPAA on Salesforce go into each rule in more detail.
Retention also affects how the org runs day to day. Salesforce notes that soft-deleted records still affect database performance because the data is still resident, even though Recycle Bin items don't count against storage.
Records nobody uses anymore keep taking up space in the org, and archiving them keeps you further from your Salesforce storage limits. By Salesforce's account, field history, Field Audit Trail data and event log files don't count against your data storage.
How do you create a data retention policy in Salesforce?
A workable policy needs a say from IT, legal and the people who own each kind of data. Our guide on how to create a data retention policy walks through the process step by step.
The process starts with a list of every object, its owner and its data classification, plus a time limit for each one. After that, you decide whether records are archived, deleted or held when the limit runs out, automate it, and check on a schedule that the jobs ran.
Don't expect one period to fit every object. A web-to-lead record and a signed contract are kept for very different reasons, so each needs its own period and its own owner.
What should happen to records and backups when retention ends?
When someone deletes records through the UI, they go to the Recycle Bin and can be restored for 15 days by default. For large data volumes, Salesforce recommends the hard delete function in Bulk API 2.0, which skips the Recycle Bin altogether.
History needs its own check. Deleting a production record cascades to its history tracking records, but Salesforce doesn't delete history that has already been copied to FieldHistoryArchive, so your erasure jobs have to clean up that big object as well.
Archival is the middle path for records you must retain but rarely open. Moving them to archive storage frees space in the org while keeping them available for audits and historical reporting.
If you keep large volumes of history inside Salesforce, big objects keep consistent performance whether you hold 1 million records or 1 billion. Our post on Salesforce historical data storage compares them with the other options.
Backups hold the same personal data as the live org, so they need a retention period of their own. Salesforce's Data Export Service won't keep them for you, since its zip files are deleted 48 hours after the email is sent.
Best practices for managing Salesforce data retention
These habits keep a retention policy working after the first rollout:
- Each object has a named owner who signs off on its retention period and any exceptions.
- One written policy holds every retention decision, with the regulation or business reason beside each one, and both legal and IT approve it.
- Setup Audit Trail and event log files get exported before their windows close if your audits look back further.
- Deletion and archive jobs run in a sandbox before they touch production data.
- The data catalog gets reviewed at least once a year and whenever a new object, integration or regulation appears.
- Restores from backup and archive get tested on a schedule, as part of your disaster recovery plan.
Retention is one part of a wider governance program. Access rules, data quality and audit trails sit beside it, as our Salesforce data governance best practices post explains.
How Flosum supports data retention management
Flosum Backup & Archive runs in Flosum's cloud or in your own cloud.
Either way, it archives with policy-driven retention, moving older records to low-cost storage you control, and archived records stay available to query. Restores work from a point in time at field, record or full-org level, so a deletion job that went too far can be undone.
A 2026 update added legal hold controls that prevent the deletion or modification of specific data for compliance and litigation purposes. For the wider picture, see our guide to choosing a Salesforce backup solution and Flosum's risk and governance tools.
FAQs
How long does Salesforce keep deleted records?
Deleted records stay in the Recycle Bin for 15 days by default, then Salesforce schedules them for hard deletion. A System Administrator can ask Support to extend the window to 30 days.
How long does Salesforce keep field history?
Standard Field History Tracking keeps changes for 18 months in the UI and up to 24 months through the API. With Field Audit Trail, history for up to 200 fields per object is kept until you delete it.
How long is Setup Audit Trail history kept?
The SetupAuditTrail object holds Setup changes for at least the last 180 days. Download it regularly if your audit period runs longer.
Does GDPR set a time limit for Salesforce data?
No, it doesn't set a fixed period. Article 5 says identifiable personal data should be kept no longer than necessary for its purpose, so you set and justify each period yourself.
What happens to Salesforce data after a contract ends?
Salesforce's Security, Privacy and Architecture documentation says it's kept in inactive status for 120 days, then deleted from production within 90 days and from backups within 180 days. Request a CSV export within 30 days of termination if you need a copy.
Do field history and event logs count against Salesforce storage?
No, neither one uses your org's data storage allowance, according to Salesforce's docs on field history and event log files.
Book a demo to see how Flosum Backup & Archive handles policy-driven retention for your Salesforce data.
Thank you for subscribing




