apex-async-patterns

Orchestrate Salesforce asynchronous processing with Future, Queueable, Batch, and Schedulable patterns.

2|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/bhanu91221/claude-sfdx-iq --skill apex-async-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: apex-async-patterns
Source: https://github.com/bhanu91221/claude-sfdx-iq/tree/main/skills/apex-async-patterns
Command: npx skills add https://github.com/bhanu91221/claude-sfdx-iq --skill apex-async-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Salesforce developers often face situations where long-running or heavy workloads must run outside of a single transaction without hitting governor limits. This Skill provides proven async patterns—Future, Queueable, Batch, and Schedulable—with guidance on chaining, monitoring, and safe separation of concerns.

Core Features & Use Cases

  • Supports asynchronous execution contexts: @future, Queueable, Batch, and Schedulable with clear guidance on chaining, limits, and monitoring.
  • Provides decision guidance for choosing the right pattern for data processing, scheduling, and multi-step workflows in Salesforce.
  • Includes practical considerations, error handling, and best practices to avoid common anti-patterns while promoting resilient designs.

Quick Start

Start by identifying the workload and implement an appropriate async pattern (future, Queueable, Batch, or Schedulable) with optional chaining to orchestrate multi-step processing.

Frequently Asked Questions about apex-async-patterns

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

FAQPage Schema
What is the best way to process large data volumes in Salesforce without hitting governor limits?

Salesforce asynchronous patterns like Batch Apex and Queueable handle large data volumes by processing records outside the main transaction, bypassing governor limits. Batch Apex processes data in manageable chunks, while Queueable handles smaller workloads and enables chaining for multi-step workflows.

When should I use Queueable vs Future methods for asynchronous processing?

Use Queueable for asynchronous processing when you need job chaining, callout capabilities, or non-primitive parameter types. Future methods are suited for simpler, isolated tasks with primitive parameters. Queueable provides better monitoring and structured execution for complex multi-step workflows.

How do I schedule and chain Apex jobs for sequential data processing pipelines?

To schedule and chain Apex jobs, use Schedulable to trigger execution at specific times and Queueable for sequential data processing pipelines. Chaining Queueable jobs allows one job to initiate the next, orchestrating multi-step workflows while respecting governor limits and maximum active batch constraints.

Does Salesforce async processing support HTTP callouts from Batch or Queueable contexts?

Salesforce async processing supports HTTP callouts from Queueable contexts by implementing the AllowsCallouts interface. Batch Apex also supports callouts by implementing Database.AllowsCallouts, enabling safe integration with external services during long-running data processing pipelines.

What are the limitations and constraints when chaining Batch Apex jobs?

Limitations of chaining Batch Apex jobs include a maximum of five active queued or concurrent batches per org, restrictions on calling future methods from batch contexts, and chain depth limits. Queueable is recommended for sequential chaining to avoid hitting these governor limit constraints.