salesloft-cost-tuning
Optimize SalesLoft API costs by reducing request volume and deep pagination. Use when analyzing API usage, reducing rate limit consumption, or planning capacity for bulk operations. Trigger: "salesloft cost", "salesloft billing", "reduce salesloft API usage".
- License 许可
- MIT
- 最近更新
- 2026-07-13
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- salesloft-cost-tuning
- tags
- [ "saas", "sales", "outreach", "salesloft" ]
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- Optimize SalesLoft API costs by reducing request volume and deep pagination. Use when analyzing API usage, reducing rate limit consumption, or planning capacity for bulk operations. Trigger: "salesloft cost", "salesloft billing", "reduce salesloft API usage".
- allowed-tools
- Read, Grep
- compatible-with
- claude-code
03 SKILL.md 正文
SalesLoft Cost Tuning
Overview
SalesLoft API cost is rate-limit-based (600 cost points/minute), not dollar-based. The primary cost driver is deep pagination -- pages beyond 100 cost 3-30x more. Optimize by using incremental sync, caching, and avoiding full table scans.
Cost Model
Rate Limit Cost Structure
| Page Range | Cost per Request | Notes |
|---|---|---|
| 1-100 | 1 point | Standard |
| 101-150 | 3 points | 3x multiplier |
| 151-250 | 8 points | 8x multiplier |
| 251-500 | 10 points | 10x multiplier |
| 501+ | 30 points | 30x multiplier |
Budget: 600 points/minute. This is the ceiling regardless of SalesLoft plan tier.
Cost Calculator
function calculateSyncCost(totalRecords: number, perPage = 100) {
const pages = Math.ceil(totalRecords / perPage);
let cost = 0;
for (let p = 1; p <= pages; p++) {
if (p <= 100) cost += 1;
else if (p <= 150) cost += 3;
else if (p <= 250) cost += 8;
else if (p <= 500) cost += 10;
else cost += 30;
}
const minutes = Math.ceil(cost / 600);
return { pages, cost, minutes, pointsPerMinute: 600 };
}
// Examples:
// 1,000 records = 10 pages = 10 points = instant
// 10,000 records = 100 pages = 100 points = instant
// 25,000 records = 250 pages = 100 + 150 + 800 = 1050 points = ~2 min
// 50,000 records = 500 pages = 100 + 150 + 800 + 2500 = 3550 points = ~6 min
Cost Reduction Strategies
Strategy 1: Incremental Sync (Biggest Win)
// Full sync of 25k people: 1050 points
// Incremental sync of last hour's changes: ~1-5 points
const { data } = await api.get('/people.json', {
params: {
updated_at: { gt: lastSyncTime }, // Only changed records
per_page: 100,
page: 1,
},
});
Strategy 2: Cache Frequently Accessed Data
// Cadence list rarely changes -- cache for 5 minutes
const cadences = await cachedGet('/cadences.json', { per_page: 100 }, 300_000);
// Person lookup by email -- cache for 1 minute
const person = await cachedGet('/people.json', { email_addresses: [email] }, 60_000);
Strategy 3: Webhook-Driven Instead of Polling
// EXPENSIVE: Poll every minute for changes
setInterval(() => api.get('/people.json', { params: { updated_at: { gt: lastCheck } }}), 60_000);
// FREE: Receive webhooks for changes (0 API cost)
app.post('/webhooks/salesloft', (req, res) => {
handlePersonUpdate(req.body.data);
res.status(200).send();
});
Strategy 4: Request Consolidation
// EXPENSIVE: 3 separate requests = 3 points
const person = await api.get(`/people/${id}.json`);
const cadences = await api.get('/cadences.json');
const activities = await api.get('/activities/emails.json');
// CHEAPER: Parallel but still 3 points -- at least saves wall-clock time
const [person, cadences, activities] = await Promise.all([...]);
Usage Monitoring
class ApiCostTracker {
private costs: { timestamp: number; endpoint: string; cost: number }[] = [];
track(endpoint: string, page: number) {
let cost = 1;
if (page > 500) cost = 30;
else if (page > 250) cost = 10;
else if (page > 150) cost = 8;
else if (page > 100) cost = 3;
this.costs.push({ timestamp: Date.now(), endpoint, cost });
}
lastMinuteCost(): number {
const cutoff = Date.now() - 60_000;
return this.costs.filter(c => c.timestamp > cutoff).reduce((sum, c) => sum + c.cost, 0);
}
}
Error Handling
| Issue | Cause | Solution |
|---|---|---|
| Frequent 429s | Deep pagination or polling | Switch to incremental sync + webhooks |
| Sync takes hours | Full table scan nightly | Switch to incremental with 5-min intervals |
| Rate limit exhausted | Multiple integrations sharing key | Use separate OAuth apps |
Resources
Next Steps
For architecture patterns, see salesloft-reference-architecture.
04 同仓库更多 Skills
zustand-store-creator
Create zustand store creator operations. Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like "zustand store creator", "zustand creator", "zustand".
zero-trust-config-helper
Configure with zero trust config helper operations. Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like "zero trust config helper", "zero helper", "zero".
zapier-integration-helper
Assist with zapier integration helper operations. Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like "zapier integration helper", "zapier helper", "zapier".
yaml-config-validator
Validate yaml config validator operations. Auto-activating skill for DevOps Basics. Triggers on: yaml config validator, yaml config validator Part of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like "yaml config validator", "yaml validator", "yaml".
xvary-stock-research
Thesis-driven equity analysis from public SEC EDGAR and market data; /analyze, /score, /compare workflows with bundled Python tools (Claude Code, Cursor, Codex).
xss-vulnerability-scanner
Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals. Triggers on: xss vulnerability scanner, xss vulnerability scanner Part of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like "xss vulnerability scanner", "xss scanner", "xss".