Today, we are happy to announce the General Availability of Salesforce Functions. With Salesforce Functions, customers can deliver scalable experiences by extending their data and workflows with the power of elastic compute and open language flexibility. Functions empower teams and accelerate developer productivity by making it easy for them to adopt modern techniques and the tools of their choice.
As a Salesforce developer, you want to focus on bringing your solution to market quickly and easily without worrying about infrastructure provisioning or managing new apps. But sometimes, you had to go off-platform to get the compute power and scalability you needed. Starting today, with Salesforce Functions, there is now another way.
With Functions, Salesforce developers can now run their programs in a dedicated, secure environment that elastically scales to meet demand. Functions can be written in standard programming languages like JavaScript/TypeScript (using Node.js) and Java, and they have access to the vast universe of open source code and libraries to accelerate development.
Functions let developers focus on the problem they need to solve and not worry about the cost or operational complexity of running their own apps. There’s no need for external services, connected apps, client keys, certificates and authorization, or the operational cost of infrastructure and app administration. Functions take care of all of this for the developer and enable their programs to run with the security and compliance that they trust Salesforce to provide.
Function invocation
Salesforce Functions can be invoked from Apex running anywhere on the platform. This means that Functions can be invoked from Flows, Process Builder, Lightning Web Components, and Apex Triggers, for both batch jobs or interactive apps, giving the full power of custom software to everyone building on Salesforce.
Function invocation architecture
Low-code productivity
Now, low-code development is more productive because developers can build apps by assembling components built with functions without sacrificing security or performance. And today, with Functions GA, customers are now developing functions that will be invoked from Flows using Apex Actions, giving their Flow Builders power that they’ve never had before.
New production-ready features
New Spaces
We wrapped up the Beta release for Functions back in June and have added a few important features that enable them to be deployed to production orgs, safely and securely. First, with Functions GA, your functions can be developed and tested on their own isolated Function “Space.” This allows development, integration, and testing to occur separately from production orgs without any impact or interference.
With Functions, you’ll have access to two completely independent Spaces: one for Test and another for Production deployments. The Test Space is ready immediately for developers to deploy functions to their scratch or sandbox orgs. When they’re through with development, function deployments can target the Production Space for live production org operations.
Enable Salesforce Functions from setup page
Developers can share the Test Space for scratch and sandbox org function development, as well as for staging and integration of full releases. Source-driven development lets the same source repository be deployed to the Production Space, which is separate and isolated from all development, test, and integration activity.
New permissions
Deployment to production orgs must be managed carefully, and Functions includes two new permissions that can be used to manage access to the Test and Production Spaces.
Compute Access
: Allows access to Functions features, including deployment to the Test SpaceCompute Production Access
: Allows access to the Production Space
Together, these permissions let you build and manage developer and admin personas that give only the access rights they need to develop and/or deploy functions to specific orgs.
Permission sets setup page
For example, you might want to consider creating Functions Developers
and Functions Administrator
permission sets (or updating existing profiles or permission sets that you have). These new permissions let you distinguish between developers that can program functions, and administrators that are allowed to deploy functions to the Production Space but don’t have full Salesforce System Administrator permissions.
New developer experience
At Dreamforce ’21, we took the next step toward CLI Unification for development across all Salesforce. Salesforce Functions is the first product to use the newly released sf
cli and command structure, which lets developers build, test, and deploy across Salesforce from one unified command-line experience.
For Functions, this means a seamless development and deployment experience that spans development, test, and deployment. With a single command, sf deploy functions
, you can push your function source out to the Functions build service where it will be compiled and start to run in a Space, waiting for an invocation from your org.
Finally, we have our amazing Visual Studio Code plugin for Functions, making it super easy to get started!
Create a Java function with Visual Studio Code
Simple, secure, safe, and sound
Functions include an SDK that relieves developers of the burden of authorizing access to their org and managing the connection and org context in their code. This, along with support for permission sets for restricted access to Salesforce data, provides a simple, secure, and seamless developer experience for accessing org data.
Get started today
Together, these new features and SDK make Salesforce Functions the simplest and most secure way to extend the power of your org.
A Salesforce Functions license is required to enable Functions for your DevHub org. Contact your Salesforce account representative for steps to acquire the license. You can learn more about Functions and how to start your development by visiting the developer documentation. We’re also planning an open-signup, time-limited Functions trial that will be available shortly. Stay tuned for updates.
About the Author
Chris Marino runs Product Management for Salesforce Platform Elastic Compute Services. Prior to this role, Chris ran Product Management for the Heroku Compute and Private Spaces offerings. Prior to Salesforce, Chris was at Cisco and several other networking companies developing solutions for routing and network traffic management.