The Async Lib provides easy way for managing asynchronous processes in Salesforce.
Async Lib is part of Apex Fluently, a suite of production-ready Salesforce libraries by Beyond the Cloud.
For more details and examples, please look into this post.
Visit https://async.beyondthecloud.dev/ to view the full documentation.
- Queueable Chain: Eliminate the issues with "Too many queueable jobs" by using the
Async.queueable()method to enqueue jobs in both synchronous and asynchronous context.- Framework will automatically handle the chaining of jobs, allowing you to enqueue multiple jobs without hitting the limit, in the same time using as many jobs as possible.
- Each job will get its own Custom Job ID, which can be used to track the job status.
- Async Result Custom Object will be created for each job, allowing you to track the status of each job.
- Support for finalizers, which are executed after the job is processed, allowing you to handle any finalization logic.
- Allows for manually adding jobs to chain
- Schedulable Jobs: Schedule jobs to run at specific times using the
Async.schedulable()method.- Convert any
QueueableJoborDatabase.Batchableinto a schedulable job, by using theasSchedulable()method. - Support easier cron expressions using the
CronBuilderclass.
- Convert any
- Batchable Jobs: Execute batch jobs using the
Async.batchable()method. - Custom Metadata Configuration: Configure the QueueableJob settings using the
QueueableJobSettings__mdtcustom metadata type to enable or disable jobs, and to control the creation of Async Result records. - Custom Object for Async Results: The
AsyncResult__ccustom object is created for each processed queueable job, allowing you to track the chained job status and details.
Two ways in. Pick one.
Versioned, uninstallable, upgrades by installing the next version. Every class carries the btcdev. prefix and a few features need a class copied from extras/. Guide: Installing as a Package.
Or with the CLI:
git clone https://github.com/beyond-the-cloud-dev/async-lib.git
cd async-lib
sf project deploy start --source-dir force-app --target-org your-orgNo namespace, nothing extra to set up, upgrades by redeploying the next tag. Guide: Deploying the Source.
- For proper license management each repository should contain LICENSE file similar to this one.
- each original class should contain copyright mark: © Copyright 2025, Beyond The Cloud Dev Authors