| name | salesforce-rate-limits |
| description | Implement Salesforce API limit management, backoff, and quota monitoring.
Use when handling REQUEST_LIMIT_EXCEEDED errors, implementing retry logic,
or optimizing API request throughput for Salesforce.
Trigger with phrases like "salesforce rate limit", "salesforce API limit",
"salesforce 403", "salesforce retry", "salesforce governor limits", "API quota".
|
| allowed-tools | Read, Write, Edit |
| version | 1.7.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","crm","salesforce"] |
| compatibility | Designed for Claude Code |
Salesforce Rate Limits
Overview
Handle Salesforce API limits gracefully. Salesforce uses a 24-hour rolling limit (not per-minute), plus concurrent request limits and Bulk API quotas.
Prerequisites
- jsforce connection configured
- Understanding of your org's edition and license count
- Access to Setup > Company Information
Instructions
Step 1: Understand Salesforce API Limits
| Limit Type | Calculation | Example (Enterprise, 50 users) |
|---|
| Daily API Requests | Base + (per-user * licenses) | 100,000 + (1,000 * 50) = 150,000 |
| Concurrent API (long-running) | 25 per org | 25 |
| Bulk API 2.0 Ingest Jobs | 15,000/day | 15,000 |
| Bulk API 2.0 Query Jobs | 15,000/day | 15,000 |
| Composite Subrequests | 25 per call | 25 |
| SOQL Query Row Limit | 50,000 per query | 50,000 |
| sObject Collections | 200 records per call | 200 |
Key difference from most SaaS APIs: Salesforce limits are per-org, not per-user or per-key. All integrations sharing the same org share the same pool.
Step 2: Monitor Remaining Quota
import { getConnection } from './salesforce/connection';
async function checkApiLimits(): Promise<{
used: number;
remaining: number;
max: number;
percentUsed: number;
}> {
const conn = await getConnection();
const limits = await conn.();
daily = limits.;
used = daily. - daily.;
percentUsed = (used / daily.) * ;
{
used,
: daily.,
: daily.,
: .(percentUsed * ) / ,
};
}