Getting Started
Get AsyncGuard up and running in under 5 minutes. Connect your Salesforce org, send your first API request, and start eliminating async processing failures.
Quick Start
AsyncGuard acts as a proxy layer between your application and Salesforce. Instead of sending writes directly, you route them through AsyncGuard, which handles serialization, queuing, and automatic retry on lock errors.
Here's the three-step process to get started:
Sign Up
Create your AsyncGuard account and grab your API key from the dashboard.
Connect Salesforce
Authorize AsyncGuard to access your Salesforce org via OAuth. Supports both Production and Sandbox environments.
Send API Requests
Replace your direct Salesforce API calls with AsyncGuard proxy endpoints. Same payload format, zero lock errors.
Sign Up
Create your free AsyncGuard account to get started. The free tier includes 10,000 API calls per month.
- Navigate to asyncguard.dev/signup and create your account with email or SSO.
- Verify your email address via the confirmation link.
- Once logged in, go to Dashboard → Settings to find your API key.
Copy your API key and set it as an environment variable:
export ASYNCGUARD_API_KEY="ag_live_your_api_key_here"
Connect Salesforce
AsyncGuard connects to your Salesforce org using OAuth 2.0, so your credentials are never stored on our servers.
- In the AsyncGuard dashboard, navigate to Connections → New Connection.
- Select Salesforce as the platform.
- Choose your environment:
- Production — connects to
login.salesforce.com - Sandbox — connects to
test.salesforce.com
- Production — connects to
- Click Authorize to launch the Salesforce OAuth flow.
- Log in to Salesforce and grant access to AsyncGuard.
Once authorized, the connection will show a green Connected status in your dashboard. AsyncGuard will handle token refresh automatically.
Your First API Call
With your API key and Salesforce connection ready, you can send your first proxied request. The example below inserts two Opportunity records through AsyncGuard's serialization layer.
curl -X POST https://api.asyncguard.dev/api/v1/proxy/salesforce \
-H "Authorization: Bearer $ASYNCGUARD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"object": "Opportunity",
"operation": "insert",
"entityKey": "AccountId",
"records": [
{
"Name": "Q1 Renewal",
"AccountId": "001xx000003ABCDEF",
"StageName": "Prospecting",
"CloseDate": "2026-06-30",
"Amount": 48000
},
{
"Name": "Q1 Expansion",
"AccountId": "001xx000003ABCDEF",
"StageName": "Qualification",
"CloseDate": "2026-07-15",
"Amount": 72000
}
]
}'
If successful, AsyncGuard returns a batch ID you can use to track processing status:
{
"batchId": "batch_01HZ3K9V7M...",
"status": "queued",
"recordCount": 2,
"entityKey": "001xx000003ABCDEF",
"createdAt": "2026-03-17T09:14:22Z"
}
Check Batch Status
Use the batch ID from the previous response to poll the status of your request. AsyncGuard processes batches asynchronously, so you may see queued, processing, or completed states.
curl https://api.asyncguard.dev/api/v1/proxy/salesforce/batch_01HZ3K9V7M.../status \
-H "Authorization: Bearer $ASYNCGUARD_API_KEY"
Response when processing is complete:
{
"batchId": "batch_01HZ3K9V7M...",
"status": "completed",
"recordCount": 2,
"successCount": 2,
"failureCount": 0,
"retryCount": 1,
"completedAt": "2026-03-17T09:14:25Z",
"results": [
{ "id": "006xx000004XYZABC", "success": true },
{ "id": "006xx000004XYZDEF", "success": true }
]
}
retryCount: 1 in the response — AsyncGuard automatically retried when it encountered a lock error, and the operation completed successfully without any intervention.How It Works
When you send records through AsyncGuard's proxy endpoint, the following happens under the hood:
- Grouping — Records are grouped by the
entityKeyfield you specify (e.g.,AccountId). This ensures that all records sharing the same parent entity are processed sequentially, preventing lock contention. - Queuing — Grouped records are placed into a FIFO queue. Each entity key gets its own queue lane, so independent entities are processed in parallel while related records stay serialized.
- Processing — AsyncGuard sends requests to Salesforce on your behalf. If a write succeeds, the next record in the queue is processed immediately.
- Automatic Retry — If Salesforce returns an
UNABLE_TO_LOCK_ROWerror (or similar transient failures), AsyncGuard automatically retries with exponential backoff. After exhausting retries, the record is moved to the Dead Letter Queue for manual review.
This architecture means your application never needs to handle retry logic, lock errors, or rate limiting — AsyncGuard takes care of it all.
Next Steps
Now that you've made your first API call, explore more of what AsyncGuard can do: