Salesforce Functions
Salesforce Functions was an elastic compute service that allowed developers to write custom business logic in languages like Java, JavaScript, and TypeScript, running on-demand in Salesforce's infrastructure with automatic scaling.
Definition
Salesforce Functions was an elastic compute service that allowed developers to write custom business logic in languages like Java, JavaScript, and TypeScript, running on-demand in Salesforce's infrastructure with automatic scaling. It was retired on January 31, 2025. Salesforce recommends using Apex, Flow, External Services, or Heroku as alternatives.
In plain English
“Salesforce Functions was an elastic compute service that let developers write custom business logic in Java, JavaScript, and TypeScript, running on-demand in Salesforce's infrastructure. It was retired on January 31, 2025. Salesforce recommends using Apex, Flow, External Services, or Heroku instead.”
Worked example
Calyx Biotech built a tax-calculation engine on Salesforce Functions in 2022 - written in TypeScript, invoked from Apex via the Functions SDK, scaling automatically when 10,000 invoice events arrived in a window. With Salesforce Functions retired on January 31, 2025, the engineering team had to migrate. They chose Heroku as the replacement: the same TypeScript code now runs as a Heroku app exposed via REST, and the Apex callout invokes it through a Named Credential. The migration took eight weeks and cost more in Heroku dynos than the old Functions billing did, but the architecture survived; the team's TypeScript skills carried over directly and the elastic scaling behavior was preserved on Heroku's runtime.
Why Salesforce Functions matters
Salesforce Functions was an elastic compute service that allowed developers to write custom business logic in languages like Java, JavaScript, and TypeScript, running on-demand in Salesforce's infrastructure with automatic scaling. It was retired on January 31, 2025. Salesforce recommends using Apex, Flow, External Services, or Heroku as alternatives.
Salesforce Functions was an attempt to bring serverless compute to the Salesforce ecosystem, letting developers use familiar languages beyond Apex. The retirement means organizations that adopted Functions need to migrate to alternatives. For most use cases, Apex and Flow cover the needs; for scenarios requiring non-Apex languages or elastic scaling, Heroku or External Services are the recommended paths.
How to set up Salesforce Functions
Salesforce Functions WAS an elastic-compute service for running custom logic in Java / JavaScript / TypeScript outside the standard Apex governor limits. It was RETIRED on January 31, 2025. Existing Functions deployments stopped running on that date; new development should use Apex (for in-platform logic), External Services (for REST callouts), or Heroku (for elastic compute).
- Recognize that Salesforce Functions is retired
As of January 31, 2025, Salesforce Functions no longer runs. Existing deployments are inactive.
- Identify what your Functions did
Audit code in your sfdx project's functions/ directory. Each function had a specific purpose — bulk data processing, external API integration, complex computation.
- Pick the right replacement based on use case
Bulk data processing → Apex Batch / Queueable. External API → External Services + Apex callouts. Heavy compute → Heroku app called via REST. Long-running jobs → Heroku or External Service with async pattern.
- Migrate function logic to the chosen replacement
Re-implement in Apex / Heroku / external service. Update calling code to point at new endpoints / Apex methods.
- Test thoroughly in a sandbox
New approach has different behavior, latency, error handling — run end-to-end tests before production cutover.
- Decommission the old Functions configuration
Remove from sfdx project; clean up any references in calling code.
For Salesforce-internal heavy logic.
For declarative external API calls.
For elastic compute outside Salesforce.
For complex integration workflows.
- Salesforce Functions retired January 31, 2025. Documentation referencing it is outdated. Don't try to deploy new Functions — they don't run.
- Migration paths vary by use case. There's no one-to-one replacement; pick based on what the function actually did. Heroku is closest in spirit but has its own deployment model.
- Apex governor limits apply to Apex replacements. Functions code that relied on bypassing governor limits (heavy compute, large data) needs Heroku — Apex won't fit.
How organizations use Salesforce Functions
Helps clients who adopted Functions migrate to Apex, Flow, or Heroku alternatives.
Treats Functions references as signals for immediate migration planning.
Trains developers on the recommended alternatives: Apex, Flow, External Services, Heroku.
Trust & references
Straight from the source - Salesforce's reference material on Salesforce Functions.
- Salesforce Functions Is Being RetiredSalesforce Help
🧠 Test your knowledge
Q1. Is Salesforce Functions still available?
Q2. What are the recommended alternatives?
Q3. What languages did Functions support?

Discussion
Loading discussion…