Skip to content

Repository files navigation


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.

Documentation

Visit https://async.beyondthecloud.dev/ to view the full documentation.

Features

  • 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 QueueableJob or Database.Batchable into a schedulable job, by using the asSchedulable() method.
    • Support easier cron expressions using the CronBuilder class.
  • Batchable Jobs: Execute batch jobs using the Async.batchable() method.
  • Custom Metadata Configuration: Configure the QueueableJob settings using the QueueableJobSettings__mdt custom metadata type to enable or disable jobs, and to control the creation of Async Result records.
  • Custom Object for Async Results: The AsyncResult__c custom object is created for each processed queueable job, allowing you to track the chained job status and details.

Installation

Two ways in. Pick one.

Unlocked package

Install Unlocked Package

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.

Source deploy

Deploy to Salesforce

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-org

No namespace, nothing extra to set up, upgrades by redeploying the next tag. Guide: Deploying the Source.

Contributors

License notes:

  • 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

About

The Async Lib provides easy way for managing asynchronous processes in Salesforce.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

38 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages