sf-integration

Implement Salesforce Apex REST and SOAP callouts with Named Credentials and retry logic.

13|2|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/jiten-singh-shahi/salesforce-claude-code --skill sf-integration-jiten-singh-shahi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sf-integration
Source: https://github.com/jiten-singh-shahi/salesforce-claude-code/tree/main/.cursor/skills/sf-integration
Command: npx skills add https://github.com/jiten-singh-shahi/salesforce-claude-code --skill sf-integration-jiten-singh-shahi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill reduces the complexity and risk of building integrations between Salesforce and external systems by providing actionable Apex patterns, authentication configuration, testing strategies, and retry/error-handling guidance for production use.

Core Features & Use Cases

  • Outbound REST & SOAP Callouts: Patterns for deterministic HTTP callouts with Named Credentials, appropriate headers, timeouts, and response handling.
  • Authentication & Named Credentials: Guidance for External Credentials, Named Principal vs Per User, OAuth/JWT flows, and migration to External Client Apps.
  • Inbound REST Endpoints: Best practices for implementing RestResource endpoints with validation, user-mode queries, and error codes.
  • Testing & Resilience: HttpCalloutMock-driven unit tests, multi-endpoint mocking strategies, retry with in-transaction retries or Queueable-based backoff, and error state recording.
  • Use Case: Synchronize orders between Salesforce and an external ERP using a Named Credential-backed outbound API with retry logic and test coverage.

Quick Start

Create an Apex outbound REST callout class that uses the Named Credential OrderManagementAPI, includes retry logic for transient failures, and a unit test that uses HttpCalloutMock.

Frequently Asked Questions about sf-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement retry logic for Salesforce Apex callouts to handle transient failures?

Salesforce Apex callout retry logic handles transient failures using in-transaction retries or Queueable-based backoff strategies. This approach records error states and ensures resilient outbound REST request execution when external APIs experience intermittent downtime.

How do I configure Named Credentials with OAuth and JWT authentication flows in Apex?

Named Credentials with OAuth and JWT authentication flows in Apex utilize External Credentials configured as Named Principal or Per User. Migrating to External Client Apps metadata deployment modernizes authentication setup and secures outbound REST and SOAP callouts.

What is the best way to test outbound HTTP callouts in Salesforce Apex?

Testing outbound HTTP callouts in Salesforce Apex is best achieved using HttpCalloutMock-driven unit tests. Multi-endpoint mocking strategies validate response handling and retry logic without requiring live external system connectivity during CI pipeline execution.

How do I deploy External Client Application metadata for Salesforce integrations?

Deploying ExternalClientApplication metadata for Salesforce integrations involves configuring External Client Apps through CI pipelines. This metadata deployment approach provisions secure OAuth and JWT connected app settings for Apex outbound callouts.

How do I set up inbound REST endpoints in Salesforce Apex with proper validation?

Setting up inbound REST endpoints in Salesforce Apex uses RestResource annotations with input validation, user-mode queries, and structured error codes. This ensures external systems can securely synchronize data into Salesforce with predictable response handling.

Can I use Named Credentials for both REST and SOAP callouts in Apex?

Named Credentials support both REST and SOAP callouts in Apex by abstracting endpoint URLs and authentication headers. This configuration ensures appropriate timeouts and response handling across different outbound integration patterns without hardcoding credentials.