Skip to content

Instantly share code, notes, and snippets.

Guide Overview
Asynchronous processing increases scalability by allowing higher limits per context, as asynchronous requests execute in their own threads behind the scenes, without users having to wait for them to complete before moving on to other work.
We commonly use the phrase “Fire and Forget” to refer to patterns that involve asynchronous processing. These patterns can improve user experiences by enhancing UI responsiveness since users can continue to do work on the client side while related tasks execute in the background.
To visualize what this might look like in Salesforce, consider an asynchronous ordering process. When an order is saved, it triggers a message to an external warehouse management system with special instructions for how to pack and ship an item. Since the user placing the order doesn’t need an immediate response from the warehouse management system, the request can be sent asynchronously, allowing the user to continue their work without delays.
Three important things to keep in mi