salesforce-known-pitfalls

Featured

Identify and avoid Salesforce anti-patterns including SOQL N+1, governor limit violations, and API waste. Use when reviewing Salesforce code for issues, onboarding new developers, or auditing existing Salesforce integrations for best practices violations. Trigger with phrases like "salesforce mistakes", "salesforce anti-patterns", "salesforce pitfalls", "salesforce what not to do", "salesforce code review".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Salesforce Known Pitfalls ## Overview The 10 most common and costly mistakes when integrating with Salesforce, with real error messages and correct patterns. ## Pitfall #1: SOQL N+1 Query Pattern (Most Common) ### Anti-Pattern ```typescript // Query accounts, then query contacts for each = N+1 API calls const accounts = await conn.query('SELECT Id, Name FROM Account LIMIT 100'); for (const account of accounts.records) { // 100 extra API calls! (plus 100 extra SOQL queries in Apex) const contacts = await conn.query( `SELECT Id, Name, Email FROM Contact WHERE AccountId = '${account.Id}'` ); } // Total: 101 API calls for what should be 1 ``` ### Correct Pattern ```typescript // Single relationship query — 1 API call const accounts = await conn.query(` SELECT Id, Name, (SELECT Id, FirstName, LastName, Email FROM Contacts) FROM Account LIMIT 100 `); // accounts.records[0].Contacts.records → child contacts ``` --- ## Pitfall #2: Ignoring API Limits (Org-Wide Shared Pool) ### Anti-Pattern ```typescript // This integration uses 80,000 API calls/day // Sales team uses 60,000/day // Total: 140,000 > 150,000 limit → everyone gets blocked ``` ### Correct Pattern ```typescript // 1. Check limits before batch operations const limits = await conn.request('/services/data/v59.0/limits/'); if (limits.DailyApiRequests.Remaining < estimatedCalls) { throw new Error('Insufficient API calls remaining'); } // 2. Use sObject Collections (1 call = 200 records) await co...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

hubspot-known-pitfalls

Identify and avoid HubSpot API anti-patterns and common integration mistakes. Use when reviewing HubSpot code, onboarding developers to HubSpot integrations, or auditing existing CRM integrations for best practice violations. Trigger with phrases like "hubspot mistakes", "hubspot anti-patterns", "hubspot pitfalls", "hubspot code review", "hubspot gotchas".

2,266 Updated today
jeremylongshore
AI & Automation Featured

salesforce-common-errors

Diagnose and fix Salesforce common errors, SOQL issues, and API exceptions. Use when encountering Salesforce errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "salesforce error", "fix salesforce", "salesforce not working", "debug salesforce", "SOQL error", "salesforce exception".

2,266 Updated today
jeremylongshore
API & Backend Solid

salesforce-development

Expert patterns for Salesforce platform development including Lightning Web Components (LWC), Apex triggers and classes, REST/Bulk APIs, Connected Apps, and Salesforce DX with scratch orgs and 2nd generation packages (2GP). Use when: salesforce, sfdc, apex, lwc, lightning web components.

27,681 Updated today
davila7
API & Backend Listed

salesforce-development

Expert patterns for Salesforce platform development including Lightning Web Components (LWC), Apex triggers and classes, REST/Bulk APIs, Connected Apps, and Salesforce DX with scratch orgs and 2nd generation packages (2GP). Use when: salesforce, sfdc, apex, lwc, lightning web components.

335 Updated today
aiskillstore
AI & Automation Featured

salesforce-performance-tuning

Optimize Salesforce API performance with SOQL tuning, Composite API batching, and caching. Use when experiencing slow API responses, optimizing SOQL queries, or reducing API call count for Salesforce integrations. Trigger with phrases like "salesforce performance", "optimize salesforce", "salesforce latency", "salesforce caching", "salesforce slow", "SOQL optimization".

2,266 Updated today
jeremylongshore