Configure Your Salesforce Org

Configure a Salesforce org to develop and invoke Functions.

Enable Dev Hub

A Developer Hub (Dev Hub) org lets you create and manage scratch orgs. A scratch org is a source-driven and disposable deployment of Salesforce code and metadata, made for developers and automation.

Enable Dev Hub in a production, sandbox, or Developer Edition org.

Enable Functions

Enable Salesforce Functions to create an authenticated connection for requests between your org and Salesforce Functions.

After you enable Functions, every scratch or sandbox org created from this Dev Hub org has Functions enabled and authenticated.

Sandbox orgs that you created from your Dev Hub org before you enabled Functions aren't enabled for Functions. Enable Functions for each of those sandbox orgs.

You can also create compute environments connected to your Dev Hub org, deploy Functions to these compute environments, and invoke them from the org.

  1. In your org, from Setup, enter Functions in the Quick Find box and select Functions.

Enable Test Space is already enabled in your Functions org.

Green checkmark showing that Functions is connected.

  • This page is available only in orgs that have Lightning Experience enabled.
  • If you cannot find the Functions page, contact your Salesforce Administrator and make sure your org is licensed to use Salesforce Functions.
  1. To connect Functions to production orgs, toggle Enable Production Space. You cannot undo this action.

Permission Sets for Functions Developers

Verify that developers working with Functions have the correct Salesforce permissions.

We recommend creating and assigning these permission sets.

Permission Set NameLets the user...Required System Permissions
  • Use Functions services and functionality.
  • Access any functionality that relies on the Heroku platform including login through CLI.
  • Deploy Functions to Scratch and Sandbox Orgs.
  • Compute Access
  • Perform any actions that require access to a production space.
  • Deploy Functions-related metadata in your Salesforce Org.
  • Compute Production Access
  • Customize Application
  • Manually deploy Functions to your Production Space.
  • Manage Permission Sets.
  • Compute Production Access
  • Manage Custom Permissions
  • Manage Session Permission Set Activations
  • Create and manage scratch orgs.
  • Add new Apex classes for Functions.
  • API Enabled
  • Author Apex
  • Manage Sandboxes

See Create Permission Sets and Assign Permission Sets to a Single User in Salesforce Help.