Loading
Salesforce now sends email only from verified domains. Read More
Automate Your Business Processes
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Global Variables Flow Approval Processes Resource

          Global Variables Flow Approval Processes Resource

          A system-provided variable hold information that can be referenced throughout the flow approval process. For example, it can contain information about the Salesforce org, running user, or triggering record.

          Required Editions

          View supported editions for Flow Approval Processes.
          Global Variable API NAME LABEL Description
          $Api API

          The Session ID’s SOAP API endpoints. These merge fields are available.

          • Enterprise_Server_URL_xxx—The Enterprise WSDL SOAP endpoint, where xxx represents the API version.
          • Partner_Server_URL_xxx—The Partner WSDL SOAP endpoint, where xxx represents the API version.
          • Session_ID
          $Label Custom Label

          A label in a custom label file in your Salesforce org. This global variable appears only if your org has custom labels.

          The returned value depends on the language setting of the contextual user.​ The value returned is one of the following, in order of precedence:

          • The local translation’s text
          • The packaged translation’s text
          • The primary label’s text
          $Orchestration Current Orchestration Run The orchestration instance associated with the parent approval process while it’s running.
          $Organization Running Org The Salesforce org where the flow is running. With this variable, you can access information like the organization’s name or address.
          $Permission Running User’s Permission The custom permission access of the user running the flow.
          $Profile Running User Profile

          The profile of the user running the flow approval process. With this variable, you can access information like the license type or name.

          • Use profile names to reference standard profiles in $Profile merge fields.
          • Users don’t need access to their profile information to run a flow approval process that references these merge fields.
          $Record Triggering Object, for example, Triggering Account

          The record that triggered the flow approval process. Available only in record-triggered flow approval processes.

          In a record-triggered flow approval process, the orchestration run associated with the parent approval submission makes a copy of the triggering record when it starts. If a flow called by a step within the flow approval process that the orchestration run is based on makes a field update on the triggering record, it’s not reflected in the $Record global variable. To make field updates on the flow approval process-triggering record called by a flow approval process step, pass the record ID to the step’s flow and use it in a Get Records element. Then use an Update Records element to apply changed $Record values to the record in the database.

          You can reference $Record values throughout the approval orchestration by passing the variable as an input parameter to a flow in a step.

          $Record__Prior Prior Values of Triggering Object, for example, Prior Values of Triggering Account

          The triggering record before a change triggered the flow approval process. Available only in record-triggered flow approval processes that are configured to run when a record is updated or when a record is created or updated.

          The $Record__Prior global variable contains the values that the triggering record had immediately before the flow approval process started. You can’t change these values in the flow approval process or with any flows associated with its steps.

          When the flow approval process is triggered by a newly created record, all $Record__Prior values are null.

          $Setup Custom Hierarchy Settings

          Your custom settings of type hierarchy. This global variable appears only if your org has hierarchy custom settings. You can access custom settings of type list only in Apex.

          Hierarchical custom settings allow values at these levels. Salesforce determines the correct value for this custom setting field based on the running user’s current context.

          • Organization—The default value for everyone
          • Profile—Overrides the Organization value
          • User—Overrides the Organization and Profile values
          $System System The system’s OriginDateTime ($System.OriginDateTime), which represents the literal value of 1900-01-01 00:00:00. Use this merge field to perform date/time offset calculations.
          $User Running User

          The user who’s running the orchestration run associated with a parent approval submission.

          Most of the time, the running user is the automated process user. When the running user is the automated process user, $User doesn’t provide useful information.

          $User.UITheme and $User.UIThemeDisplayed identify the look and feel that the running user sees on a Salesforce page. The difference between the two variables is that $User.UITheme returns the look and feel the user is supposed to see, while $User.UIThemeDisplayed returns the look and feel the user actually sees. For example, a user can have the preference and permissions to see the Lightning Experience look and feel, but if they’re using a browser that doesn’t support that look and feel, for example, older versions of Internet Explorer, $User.UIThemeDisplayed returns a different value. These merge fields return one of these values.

          • Theme1—Obsolete Salesforce theme
          • Theme2—Salesforce Classic 2005 user interface theme
          • Theme3—Salesforce Classic 2010 user interface theme
          • Theme4d—Modern “Lightning Experience” Salesforce theme
          • Theme4t—Salesforce mobile app theme
          • Theme4u—Lightning Console theme
          • PortalDefault—Salesforce Customer Portal theme
          • Webstore—AppExchange theme
          $UserRole Running User Role The role of the user who’s running the orchestration run associated with a parent approval submission. For example, reference the role name or ID.

          Global Variable Considerations for Flow Approval Processes

          • In a record-triggered flow approval process, the $Record global variable doesn’t contain the triggering record’s values for fields whose values are derived from other records. Examples of derived fields include Contact.Name and User.MediumPhotoUrl.
          • Multi-select picklist, time, and location global variables are available only in formulas.
          • If a field in the database has no value, the corresponding merge field returns a blank value. For example, if no value is set for your org’s Country field, {!$Organization.Country} returns no value.
           
          Loading
          Salesforce Help | Article