Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
DictionarySSalesforce Functions
PlatformAdvanced

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.

§ 01

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.

§ 02

In plain English

👋 Study buddy

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.

§ 03

Worked example

scenario · real-world use

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.

§ 04

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.

§ 05

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).

  1. Recognize that Salesforce Functions is retired

    As of January 31, 2025, Salesforce Functions no longer runs. Existing deployments are inactive.

  2. 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.

  3. 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.

  4. Migrate function logic to the chosen replacement

    Re-implement in Apex / Heroku / external service. Update calling code to point at new endpoints / Apex methods.

  5. Test thoroughly in a sandbox

    New approach has different behavior, latency, error handling — run end-to-end tests before production cutover.

  6. Decommission the old Functions configuration

    Remove from sfdx project; clean up any references in calling code.

Key options
Replacement: Apex Batch / Queueableremember

For Salesforce-internal heavy logic.

Replacement: External Servicesremember

For declarative external API calls.

Replacement: Herokuremember

For elastic compute outside Salesforce.

Replacement: Workato / Mulesoftremember

For complex integration workflows.

Gotchas
  • 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.
§ 06

How organizations use Salesforce Functions

Skyline Consulting

Helps clients who adopted Functions migrate to Apex, Flow, or Heroku alternatives.

TerraForm Tech

Treats Functions references as signals for immediate migration planning.

CodeBridge

Trains developers on the recommended alternatives: Apex, Flow, External Services, Heroku.

§

Trust & references

Official documentation

Straight from the source - Salesforce's reference material on Salesforce Functions.

Was this entry helpful?
Help us write better definitions. Quick reactions or detailed edit suggestions.
§

🧠 Test your knowledge

Q1. Is Salesforce Functions still available?

Q2. What are the recommended alternatives?

Q3. What languages did Functions support?

§

Discussion

Loading…

Loading discussion…