---
schema_version: "1"
id: a09f3b02c71dc0ec85bdadb33e474e156cf3369479afe0d532a6cf3969609d2b
title: Global Variables Flow Orchestration Resource
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/orchestrator_ref_resources_global_variables.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.orchestrator_ref_resources_global_variables.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 56fc51c49b4211a46745ce132e8a95d20a2a002a85ada481bcbaeab647573a4d
description: Use system-provided variables that reference information about the Salesforce org or running user, such as the user’s ID or the API session ID.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Global Variables Flow Orchestration Resource

Use system-provided variables that reference information about the Salesforce org or running user, such as the user’s ID or the API session ID.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col style="width:100%"></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.automate_orchestrator_about_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Review the supported products and editions for Flow Orchestration.">View supported editions for Flow Orchestration.</a></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
      <colgroup>
        <col style="width:16.15508885298869%">
        <col style="width:16.15508885298869%">
        <col style="width:67.68982229402262%">
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d265733e65">Global Variable</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d265733e68">LABEL</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d265733e71">Description</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Global Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e65 ">
            <code>$Api</code>
          </td>

          <td data-label="LABEL" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e68 "><strong class="uicontrol">API</strong></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e71 ">
            <p>References an API URL or the session ID. These merge fields are available.</p>
            <ul>
              <li><code>Enterprise_Server_URL_<var>xxx</var></code>—The Enterprise
                WSDL SOAP endpoint, where <var>xxx</var> represents the API version</li>

              <li><code>Partner_Server_URL_<var>xxx</var></code>—The Partner WSDL SOAP
                endpoint, where <var>xxx</var> represents the API version</li>

              <li><code>Session_ID</code></li>

            </ul>
          </td>

        </tr>
        <tr class="">
          <td data-label="Global Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e65 ">
            <code>$Flow</code>
          </td>

          <td data-label="LABEL" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e68 "><strong class="uicontrol">Running Flow Interview</strong></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e71 ">References information about the running flow interview. For details, see <a href="https://help.salesforce.com/s/articleView?id=platform.orchestrator_ref_resources_system_variables.htm&amp;release=264.0.0&amp;type=5" title="A $Flow global variable provides information about the running orchestration. Some variables contain system-provided values. You can update the other variables throughout the orchestration by storing output values in the variables.">$Flow Global Variables Flow Orchestration Resource</a>.</td>

        </tr>
        <tr class="">
          <td data-label="Global Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e65 ">
            <code>$Label</code>
          </td>

          <td data-label="LABEL" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e68 "><strong class="uicontrol">Custom Label</strong></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e71 ">
            <p>References custom labels. This global variable appears only if your org has
              custom labels. </p>
            <p>The returned value depends on the language setting of the contextual
              user.​ Salesforce returns a value based on this order of precedence:</p>
            <ul>
              <li>The local translation’s text</li>

              <li>The packaged translation’s text</li>

              <li>The primary label’s text </li>

            </ul>
          </td>

        </tr>
        <tr class="">
          <td data-label="Global Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e65 "><code>$Orchestration</code></td>

          <td data-label="LABEL" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e68 "><strong class="uicontrol">Current Orchestration Run</strong></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e71 ">References the current orchestration instance.</td>

        </tr>
        <tr class="">
          <td data-label="Global Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e65 ">
            <code>$Organization</code>
          </td>

          <td data-label="LABEL" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e68 "><strong class="uicontrol">Running Org</strong></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e71 ">References information about your company.</td>

        </tr>
        <tr class="">
          <td data-label="Global Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e65 ">
            <code>$Permission</code>
          </td>

          <td data-label="LABEL" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e68 "><strong class="uicontrol">Running User’s Permission</strong></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e71 ">References <span id="orchestrator_ref_resources_global_variables__permission_var_description"><a name="orchestrator_ref_resources_global_variables__permission_var_description"><!-- --></a>information about the current
              user’s custom permission access. </span></td>

        </tr>
        <tr class="">
          <td data-label="Global Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e65 ">
            <code>$Profile</code>
          </td>

          <td data-label="LABEL" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e68 "><strong class="uicontrol">Running User Profile</strong></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e71 ">
            <p>References information from the current user’s profile, such as license type or
              name. </p>
            <ul>
              <li>Use profile names to reference standard profiles in
                <samp class="parmname">$Profile</samp> merge fields.
              </li>

              <li>Users don’t need access to their profile information to run a flow that
                references these merge fields.</li>

            </ul>
          </td>

        </tr>
        <tr class="">
          <td data-label="Global Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e65 ">
            <code>$Record</code>
          </td>

          <td data-label="LABEL" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e68 "><strong class="uicontrol">Triggering</strong>
            <var>Object</var>, for example, <strong class="uicontrol">Triggering
              Account</strong>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e71 ">
            <p>Available only in record-triggered orchestrations.</p>
            <p>In a record-triggered
              orchestration, the orchestration makes a copy of the triggering record when it
              starts. If a step within that orchestration makes a field update on the triggering
              record, it’s not reflected in the <code>$Record</code> global variable. To make
              field updates on the orchestration-triggering record, pass the record ID to the
              step’s flow. Then use the ID in a Get Records element. </p>
            <p style="margin-bottom:0;">You can reference
              <code>$Record</code> values throughout the orchestration by passing the
              variable as an input parameter to a flow in a step.
            </p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Global Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e65 ">
            <code>$Record__Prior</code>
          </td>

          <td data-label="LABEL" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e68 "><strong class="uicontrol">Prior Values of Triggering</strong>
            <var>Object</var>, for example, <strong class="uicontrol">Prior Values of Triggering
              Account</strong>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e71 ">
            <p>Available only in record-triggered orchestrations configured to run when a record
              is updated or when a record is created or updated.</p>
            <p>The
              <code>$Record__Prior</code> global variable contains the values that the
              triggering record had immediately before the orchestration started. You can’t change
              these values in the orchestration or with any flows associated with its
              steps.
            </p>
            <p>When a newly created record triggers the orchestration, all
              <code>$Record__Prior</code> values are <code>null</code>.
            </p>
            <p style="margin-bottom:0;">If the
              triggering record is created and updated in the same transaction,
              <code>$Record__Prior</code> contains the same values as
              <code>$Record</code>. This behavior occurs because no committed prior state
              exists when the update occurs. To capture pre-update field values in
              <code>$Record__Prior</code>, split the create and update operations into
              separate transactions in the automation that triggers the orchestration.
            </p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Global Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e65 ">
            <code>$Setup</code>
          </td>

          <td data-label="LABEL" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e68 "><strong class="uicontrol">Custom Hierarchy Settings</strong></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e71 ">
            <p>References custom settings of type <code>hierarchy</code>. This global
              variable appears only if your org has hierarchy custom settings. You can access custom
              settings of type <code>list</code> only in Apex. </p>
            <p>With hierarchy custom
              settings, you can define values at these levels. Salesforce determines the correct
              value for this custom setting field based on the running user’s current context.</p>
            <ul>
              <li>Organization—The default value for everyone </li>

              <li>Profile—Overrides the Organization value </li>

              <li>User—Overrides the Organization and Profile values</li>

            </ul>
          </td>

        </tr>
        <tr class="">
          <td data-label="Global Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e65 ">
            <code>$System</code>
          </td>

          <td data-label="LABEL" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e68 "><strong class="uicontrol">System</strong></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e71 "><code>$System.OriginDateTime</code> represents the literal value of
            <samp>1900-01-01 00:00:00</samp>. Use this merge field to perform
            date/time offset calculations.
          </td>

        </tr>
        <tr class="">
          <td data-label="Global Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e65 ">
            <code>$User</code>
          </td>

          <td data-label="LABEL" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e68 "><strong class="uicontrol">Running User</strong></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e71 ">
            <p>References information about the user who’s running the orchestration.</p>
            <p>Most of
              the time, an orchestration’s running user is the automated process user. When the
              running user is the automated process user, $User doesn’t provide useful
              information.</p>
            <p><code>$User.UITheme</code> and
              <code>$User.UIThemeDisplayed</code> identify the look and feel that the
              running user sees on a Salesforce page. The difference between the two variables is
              that <samp class="parmname">$User.UITheme</samp> returns the configured look and feel for the
              user. <samp class="parmname">$User.UIThemeDisplayed</samp> returns the actual look and feel
              for the user.
            </p>
            <p>For example, a user has the preference and permissions to see
              the Lightning Experience look and feel. However, they're using a browser, such as an
              older version of Internet Explorer, that doesn't support that look and feel. In this
              example, <code>$User.UITheme</code> and
              <samp class="parmname">$User.UIThemeDisplayed</samp> return different values.
            </p>
            <ul>
              <li><code>Theme1</code>—Obsolete Salesforce theme</li>

              <li><code>Theme2</code>—Salesforce Classic 2005 user interface theme</li>

              <li><code>Theme3</code>—Salesforce Classic 2010 user interface theme</li>

              <li><code>Theme4d</code>—Modern “Lightning Experience” Salesforce theme</li>

              <li><code>Theme4t</code>—Salesforce mobile app theme</li>

              <li><code>Theme4u</code>—Lightning Console theme</li>

              <li><code>PortalDefault</code>—Salesforce Customer Portal theme </li>

              <li><code>Webstore</code>—AppExchange theme</li>

            </ul>
          </td>

        </tr>
        <tr class="">
          <td data-label="Global Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e65 ">
            <code>$UserRole</code>
          </td>

          <td data-label="LABEL" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e68 "><strong class="uicontrol">Running User Role</strong></td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d265733e71 ">References information about the current user’s role, such as the role name or
            ID.</td>

        </tr>
      </tbody>
    </table>

## Global Variable Considerations for Orchestrations

- In a record-triggered orchestration, the `$Record` global variable doesn't contain the triggering record's values for fields that derive their values 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 your org’s Country field has no value, `{!$Organization.Country}` returns no value.

- **[$Flow Global Variables Flow Orchestration Resource](https://help.salesforce.com/s/articleView?id=platform.orchestrator_ref_resources_system_variables.htm&release=264.0.0&type=5)**  
    A `$Flow` global variable provides information about the running orchestration. Some variables contain system-provided values. You can update the other variables throughout the orchestration by storing output values in the variables.