Welcome to apex-async-actions, a production-ready Salesforce platform tool designed to simplify and enhance asynchronous task management.
Apex Async Actions was designed to solve the challenges of asynchronous processing at scale, offering a comprehensive framework that's both powerful and easy to use.
You get the following out of the box:
- Asynchronous Task Management - Create and manage custom asynchronous operations using Apex or Flow
- Built-in Error Handling - Automatic retry logic with configurable retry behaviors and intervals
- Comprehensive Monitoring - Track every operation instance as an
AsyncAction__crecord for full visibility - Flexible Processor Types - Support for both Apex classes and Flows as processor implementations
- Configurable Execution - Control batch sizes, retry policies, and scheduling through metadata configuration
- Production Monitoring - List views, related lists, and reporting capabilities for operational oversight
- Plugin Architecture - Extensible logging framework with support for custom integrations
- Automatic Scheduling - Built-in scheduled job management for regular processing intervals
Best of all, the framework is built 100% on the Salesforce platform using standard Salesforce technology. It's available as an unlocked package, and it always will be.
apex-async-actions is available as an unlocked package with no namespace. You can find the latest version in the Releases tab.
Use the following command to install the package in your environment:
sf package install --package {{package_version_id}} --wait 10Once installed, assign the AsyncActionAdministrator permission set to users who need access to view and edit AsyncAction__c records:
sf org assign permset -n AsyncActionAdministratorOnce installed, creating asynchronous actions is a simple two-step process:
Choose between Apex or Flow to define your processor logic:
Using Apex:
public class FooProcessor implements AsyncActions.Processor {
public void process(AsyncActionProcessor__mdt settings, List<AsyncAction__c> actions) {
// Create a Bar__c record for each Foo__c related to the given actions
List<Bar__c> bars = new List<Bar__c>();
for (AsyncAction__c action : actions) {
Id fooId = (Id) action?.RelatedRecordId__c;
Bar__c bar = new Bar__c(Foo__c = fooId);
bars?.add(bar);
// Mark the action as completed
action.Status__c = 'Completed';
}
insert bars;
}
}Using Flow: Clone the included Template Flow and customize the logic. The framework automatically handles bulkification.
Create an AsyncActionProcessor__mdt record to configure how your processor runs:
Set the Processor field to your class name or flow API name, configure batch size and retry settings, then enable the processor.
Use the AsyncActions.initAction() method to create action records:
AsyncActionProcessor__mdt settings = AsyncActionProcessor__mdt.getInstance('My_Processor');
AsyncAction__c action = AsyncActions.initAction(settings, recordId, customData);
insert action;The framework will automatically process pending actions based on your configuration!
The framework operates on several key principles:
- Processors define the logic to be executed asynchronously
- AsyncAction__c records represent individual work items to be processed
- AsyncActionProcessor__mdt configures how processors behave
- AsyncActionJob is the queueable that orchestrates processing
- Status lifecycle tracks actions from Pending → Completed/Failed
Track the status of your actions through the included UI components:
Check out the sidebar for comprehensive documentation about:
- Getting started guide with detailed setup instructions
- Core concepts explaining the framework architecture
- Object documentation for all custom objects and fields
- Class documentation for all global classes and methods
- Flow integration and customization guide


