Follow and complete a Learn MOAR Spring ’23 trailmix for developers or admins by March 31, 2023, 11:59PM PT to earn a special community badge and be automatically entered for a chance to win one of five $200 USD Salesforce Certification vouchers. Restrictions apply. Learn how to participate and review the Official Rules by visiting the Trailhead Quests page.
Since the Salesforce Functions release in October 2021, we have been working tirelessly on adding new features to the product based on the feedback we have received from our customers and the developer community. In this blog post, we will cover the latest additions and innovations to Salesforce Functions from the Elastic Services team.
What’s new in Spring ’23 for Functions
Salesforce Functions for Python
Python is now supported as a language for writing Salesforce Functions!
With the addition of Python support, developers can now use their knowledge of this popular programming language to build powerful extensions to their Salesforce applications.
This means that you can leverage the power of the Python ecosystem and its wealth of libraries and frameworks. From AI to data science to machine learning, Python, and its most popular package repository PyPI, have libraries for almost any task.
To create a Salesforce Function in Python, you can execute the following command from the root of your Salesforce project:
And here is an example of a simple “Hello, world” function in Python:
To get early access to this before the Spring ’23 release, please visit the project’s readme to get started.
In the Spring ’23 release, support for the Salesforce BulkAPI v2 will be built into the Functions SDKs for all of our supported languages. This allows developers to easily access and work with large datasets within your Salesforce org. It is useful when inserting, updating, or deleting more than 2,000 records at a time.
To get started, use the
BulkApi.submit method in one of the supported languages. For example, in Java, you can create and submit a job like this:
Binary field support
For all of our SDKs, we’ve made it easier to work with
binary/base64 data, such as documents stored and retrieved as part of a record’s ContentVersion.
See below for an example function that showcases this functionality and manipulates an image stored within your Salesforce org.
Custom Cloud Native Buildpacks (CNBs)
One of the most popular requests has been providing a way to install Puppeteer and its set of Chromium dependencies for use within a Salesforce Function. Now, you can!
Cloud Native Buildpacks, an open-source CNCF project, is one of the open-source technologies which powers Salesforce Functions. With the Spring ’23 release, you can now add a custom CNB with your function to provide additional functionality, including the installation of additional dependencies that may be needed by your function.
We will publish documentation in the coming days. Keep an eye out for the Salesforce Functions release notes!
Additional global regions
We recently launched new regions around the world to host your Salesforce Functions, allowing deployment of your function in a region of your choice. This will make it easier than ever for you to meet your security and regulatory requirements — all while staying within the Salesforce trust boundary and decreasing latency.
Below is a current list of the supported regions:
- Virginia, USA (current)
- Oregon, USA
- Dublin, Ireland
- Frankfurt, Germany
- Tokyo, Japan
- Sydney, Australia
We have additional regions planned — keep an eye out for further news!
To get started with Salesforce Functions in these additional regions, please contact your account executive.
Learn MOAR this week
Our Product Managers and Developer Advocates are back to share the latest features and functionality. To help you develop faster, there’s a wealth of new content from Developer Relations covering their favorite new features. Be sure to check out Release Readiness Live on Friday, January 20th at 9:00 PST, and read all the latest Salesforce Developers blog posts for more developer-related innovations in the Spring ’23 release!
To learn even more, check out the Spring ’23 trailmix.
About the author
Andre Sayre is a Director of Product Management within Salesforce’s Elastic Services. He is focused on bringing a great experience using open industry languages and build tools to the Salesforce Platform, including Heroku and Salesforce Functions. He is passionate about making the developer experience great for developers of all experience levels. You can follow him on his LinkedIn.