Skip to content

Platform Limits: Quick Reference

Governor limits exist because Salesforce is multi-tenant — all customers share compute, storage, and network. These limits are not bugs; they are the foundation that enables automatic scaling, zero-downtime upgrades, and enterprise security at commodity pricing. Know them cold.

Per-Transaction Limits (Synchronous)

The limits you hit most often. Memorize the bolded rows.

ResourceLimitNotes
SOQL queries100Most common limit hit — SOQL in loops
Records retrieved (SOQL)50,000Per transaction total
SOSL searches20Rarely the bottleneck
DML statements150DML in loops hits this fast
Records processed (DML)10,000Bulk data operations
Callouts100Per transaction
Callout timeout120s totalMax 120s per individual callout
CPU time10,000 msComplex Flows + Apex chains
Heap size6 MBLarge collections or JSON payloads
Future calls50Per transaction
Queueable jobs50Per transaction
EventBus.publish150Per transaction
Email invocations10Per transaction

Per-Transaction Limits (Asynchronous)

Async gets higher limits — use this when sync limits are not enough.

ResourceSync LimitAsync LimitMultiplier
SOQL queries1002002x
CPU time10,000 ms60,000 ms6x
Heap size6 MB12 MB2x
Records retrieved50,00050,000Same

Per-24-Hour Org Limits

ResourceLimitNotes
API calls100,000+ (base + per-user)Soft limit; not immediately blocked
Async Apex executions250,000 or 200 x licensesWhichever greater
Batch Apex jobs100 queued/activeConcurrent
Scheduled Apex jobs100Concurrent
Platform Events~100K/day (varies)Based on entitlement
Outbound emails (single)5,000Per org per day
Mass emails5,000 external recipients/day (per-blast: 500 EE, 1,000 UE)Daily cap shared with single email; per-blast limit varies by edition

The 4 limits CTAs hit most

  1. 100 SOQL per sync transaction — bad code or AppExchange packages querying in loops
  2. 10,000 DML records — bulk data operations exceeding per-transaction limit
  3. API calls per 24 hours — integration-heavy architectures burning through allocation
  4. CPU time (10s sync) — complex Flow automation chains with nested subflows

On-Platform vs Off-Platform Decision

Default: on-platform. Only go off-platform when you can name the specific constraint.

flowchart TD
    A[New capability] --> B{Primarily for<br/>SF users?}
    B -->|Yes| C{Within governor<br/>limits?}
    B -->|No| D[Off-platform +<br/>SF API]
    C -->|Sync OK| E{Declarative?}
    C -->|Async OK| F[On-platform<br/>Async Apex]
    C -->|Exceeds even async| D
    E -->|Yes| G["On-platform<br/>Declarative (Flows)"]
    E -->|No| H[On-platform<br/>Apex + LWC]

    style G fill:#2d6a4f,color:#fff
    style F fill:#457b9d,color:#fff
    style H fill:#457b9d,color:#fff
    style D fill:#9d0208,color:#fff
Go Off-Platform WhenExample
Processing exceeds async limitsETL of 100M records nightly
Long-running computation (minutes-hours)ML model training
Complex UI beyond LightningConsumer-facing app with AR
Real-time streaming at scaleIoT sensors, Kafka-level throughput
Specialized compliancePCI DSS card processing
Heavy computationImage/video processing, NLP

The 5x rule

Off-platform maintenance cost is 3-5x initial development over 5 years. Always include this in TCO when recommending off-platform. On-platform, Salesforce absorbs infrastructure, security, and upgrade costs.

Async Pattern Quick Ref

PatternMax TimeStateChainingBest For
Future Method60sNo (primitives only)NoSimple fire-and-forget
Queueable Apex60sYes (serializable)Yes (default depth 5, configurable via AsyncOptions — Spring ‘25+)Complex async with state
Batch Apex60s/batchLimited (Stateful)Yes (via finish)Large data: thousands to millions
SchedulableN/AN/AInvokes othersTime-based scheduling
flowchart TD
    A[Need async] --> B{Data volume?}
    B -->|Small| C{Need state<br/>or chaining?}
    B -->|Large: thousands+| D[Batch Apex]
    C -->|No| E[Future Method]
    C -->|Yes| F[Queueable Apex]

    style E fill:#2d6a4f,color:#fff
    style F fill:#457b9d,color:#fff
    style D fill:#9d0208,color:#fff

Prefer Queueable over Future

Queueable Apex is the modern replacement for Future methods. It supports complex objects (not just primitives), chaining, and monitoring via AsyncApexJob. Default to Queueable unless simplicity is the only goal.

Platform Events & CDC

FeaturePlatform EventsChange Data Capture
Event sourceCustom (you define)Automatic (record changes)
PayloadCustom fieldsChanged fields (delta)
Use caseBusiness events, cross-system notificationsNear-real-time data sync
Retention72 hours (high-volume; standard-volume being retired)72 hours
SubscriptionApex triggers, Flow, CometD, gRPCSame as Platform Events

Use CDC for record-change-driven integration (replaces polling). Use Platform Events for custom business events decoupled from record changes.

Big Objects & Custom Metadata

FeatureBig ObjectsCustom Metadata TypesCustom Settings
PurposeMassive data storage (billions)Configuration/mapping dataPer-user/profile settings
StorageSeparate from standardMetadata (no storage impact)Data storage
QueryableStandard SOQL on indexed fields (Async SOQL retired Summer ‘25)getInstance (no SOQL limit)getInstance (no SOQL limit)
ReportingNot in standard reportsN/AN/A
DeployableN/AYes (change sets, packages)No (must load per env)
TriggersNoN/AN/A

Default to Custom Metadata Types

For configuration data (feature flags, mapping tables, app config), always recommend Custom Metadata Types over Custom Settings. Key advantage: they deploy through change sets and CI/CD pipelines like metadata, not data. Custom Settings require manual loading in each environment.

Agentforce Architecture (2025-2026)

New platform capabilities to be aware of for current CTA scenarios:

ComponentWhat It DoesArchitectural Impact
Agentforce BuilderLow-code agent creationDeclarative AI, no custom ML infra needed
Atlas Reasoning EngineAI reasoning (2x relevance, 33% more accurate)On-platform AI processing
Agentforce VoiceNatural language voice interactionsReplaces custom voice integrations
Data Cloud (Data 360)Unified data ingestion + harmonizationGrounds AI agents in enterprise data
Intelligent ContextUnstructured data understandingReduces need for external NLP

Agentforce for CTA scenarios

When a scenario mentions AI, chatbots, or autonomous agents, Agentforce is the platform-first answer. It replaces the need for external AI/ML infrastructure in many cases. Frame as: “Agentforce provides on-platform AI capabilities, avoiding off-platform ML infrastructure costs.”

Data & Storage Limits

ResourceLimit
Custom objects200 (EE) / 2,000 (UE/PE)
Fields per object (custom)500
Record size~8 KB per record
Formula field size5,000 characters compiled
SOQL query length100,000 characters

Anti-Patterns to Avoid

Anti-PatternWhy It BreaksFix
SOQL in loopsHits 100 query limit at ~100 iterationsQuery once, use maps
DML in loopsHits 150 DML limit fastCollect records, single DML
Sync callouts for batch dataBlocks user, timeout riskAsync callouts or batch
Hard-coded IDsBreaks across environmentsCustom Metadata or Schema class
No error handling on integrationSilent failures, data gapsError queue + monitoring
Polling for changesWastes API callsCDC or Platform Events
Wide objects (300+ fields)Performance, maintainabilitySplit into related objects

Reverse-Engineered Use Cases

Scenario 1: Logistics company needs to process 50M shipment records nightly from ERP, update Salesforce accounts with delivery metrics.

  • Decision: Off-platform ETL (MuleSoft or Informatica) + Bulk API 2.0 into Salesforce
  • Why: 50M records exceeds any on-platform batch processing in a reasonable window. Bulk API 2.0 handles large data loads efficiently.
  • On-platform complement: Batch Apex for post-load processing (rollup calculations, notifications) in chunks of 200.
  • Trade-off: Off-platform ETL requires infrastructure management. Mitigate with MuleSoft (Salesforce-owned, managed runtime).

Scenario 2: Retail company wants real-time inventory visibility in Salesforce from their warehouse management system.

  • Decision: Platform Events for near-real-time inventory updates. Warehouse system publishes events via API. Apex trigger or Flow subscribes and updates inventory records.
  • Why: Platform Events provide near-real-time without polling (no wasted API calls). Within daily event entitlement for typical inventory update volumes.
  • Trade-off: At-least-once delivery means potential duplicates. Mitigate with idempotent processing (check external ID before insert).

Scenario 3: Financial services firm needs 10-year audit trail for all field changes on Account and Contact objects.

  • Decision: Shield Field Audit Trail (retains up to 10 years)
  • Why: Standard field history tracking only retains 18 months. Regulatory requirement demands 10 years. Field Audit Trail is purpose-built for this.
  • Alternative considered: Custom audit object with triggers. Rejected because it consumes data storage, requires custom development, and is harder to query than the native Field Audit Trail.
  • Trade-off: Shield is an add-on cost ($25/user/month) unless on Performance Edition.

Sources