---
schema_version: "1"
id: 7f48a88297cdb8b2b496e6b4e04b965e549cb60fd034b301759ee39516e4fb55
title: $Flow Global Variables Resource
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_ref_resources_system_variables.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_resources_system_variables.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f6bf40866d5c3916276e9389128107ce98ed694fa7e42b6b5a9559a9814c8925
description: In a flow, a $Flow global variable provides information about the running flow interview. Some variables contain system-provided values. You can update the other variables throughout the flow by using Assignments or by storing output values in the variables.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# `$Flow` Global Variables Resource

In a flow, a `$Flow` global variable provides information about the running flow interview. Some variables contain system-provided values. You can update the other variables throughout the flow by using Assignments or by storing output values in the variables.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

This video explains what variables are and how flows use them to hold data.

View this [video](https://play.vidyard.com/MppqcKZd36p1YYX8iUruXi.html) in a separate tab.

This video explains variable types including common types, Boolean, Apex-defined, and collection variables.

View this [video](https://play.vidyard.com/Arao1M9qodyVTgW8myyU2J?) in a separate tab.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
      <colgroup>
        <col style="width:27.27272727272727%">
        <col style="width:18.181818181818183%">
        <col style="width:36.36363636363637%">
        <col style="width:18.181818181818183%">
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d346911e97">Global Variable</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d346911e100">Supported Resource Types</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d346911e103">Description</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d346911e106">Value Set By</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Global Variable" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e97 ">
            <code>$Flow.ActiveStages</code>
          </td>

          <td data-label="Supported Resource Types" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e100 ">Stage</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e103 ">
            <p>A collection of stage resources that are relevant to the current path of the
              flow.</p>
            <p>The stages that appear in the standard progress indicator at run
              time.</p>
            <p style="margin-bottom:0;">Stage resources set to Active by Default are in the
              <code>$Flow.ActiveStages</code> global variable when the flow interview
              starts.
            </p>
          </td>

          <td data-label="Value Set By" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e106 ">System and Assignment</td>

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

          <td data-label="Supported Resource Types" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e100 ">Text, Date, and Date/Time</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e103 ">Date when the flow interview runs the element that references the global
            variable.</td>

          <td data-label="Value Set By" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e106 ">System</td>

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

          <td data-label="Supported Resource Types" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e100 ">Text</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e103 ">
            <p>ID of a related record. The value must be a single ID for a valid object. All
              custom objects and most standard objects are valid. </p>
            <p style="margin-bottom:0;">When a user pauses the flow
              interview or the interview runs a Wait element, the interview is associated with
              this record by creating a FlowRecordRelation record. If the ID isn’t valid, the
              interview fails to pause.</p>
          </td>

          <td data-label="Value Set By" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e106 ">Assignment</td>

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

          <td data-label="Supported Resource Types" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e100 ">Stage</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e103 ">
            <p>The stage the screen flow running user is in.</p>
            <p>In the standard progress
              indicator, the stage associated with the current screen element at run
              time.</p>
            <p style="margin-bottom:0;">The stage that's highlighted in the standard progress
              indicator.</p>
          </td>

          <td data-label="Value Set By" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e106 ">System and Assignment</td>

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

          <td data-label="Supported Resource Types" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e100 ">Text, Date, and Date/Time</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e103 ">Date and time when the flow interview runs the element that references the global
            variable.</td>

          <td data-label="Value Set By" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e106 ">System</td>

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

          <td data-label="Supported Resource Types" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e100 ">Text</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e103 ">System fault message that can help flow administrators troubleshoot
            runtime issues.</td>

          <td data-label="Value Set By" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e106 ">System</td>

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

          <td data-label="Supported Resource Types" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e100 ">Text</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e103 ">Unique identifier for the interview.</td>

          <td data-label="Value Set By" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e106 ">System</td>

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

          <td data-label="Supported Resource Types" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e100 ">Text, Date, and Date/Time</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e103 ">Date and time when the flow interview started. For a flow launched by
            a Subflow element, <code>$Flow.InterviewStartTime</code> indicates when the initial master
            flow started.</td>

          <td data-label="Value Set By" class="slds-cell-wrap" style="vertical-align:top;" headers="d346911e106 ">System</td>

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

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_example.png)

Example A flow is used internally by call center personnel. For each flow element that interacts with the Salesforce database, a fault connector leads to a screen. A Display Text screen component displays the system fault message and instructs the flow user to provide that message to the IT department.

```
Sorry, but you can't
        read or update records at this time. 
Please open a case with IT, and include the following error message:
{!$Flow.FaultMessage}
```

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_example.png)

Example If a customer asks to be forgotten, make sure to delete all references to information that could personally identify the customer, including data in paused flow interviews. When an interview runs a Wait element or is paused by a user, all the interview data is serialized and saved to the database as a Paused Flow Interview record. When the interview is resumed, the Paused Flow Interview record is deleted.

To identify which paused interviews include personal data for a contact, lead, or user, build a custom object to track the interview’s GUID and the affected contact, lead, or user. When an interview references personal data, such as a lead’s email or credit card number, create a record of the custom object using the lead’s ID and `{!$Flow.InterviewGuid}`. Before the final screen, delete all records of the custom object referencing the interview’s GUID. That way, the custom object tracks only interviews that are saved to the database.

When a customer asks to be forgotten, create a report that lists all the custom object records where LeadId matches the customer’s record. Then for each custom object record, delete the flow interview that corresponds to the provided GUID.

#### See Also

- [Customize What Happens When a Flow Fails](https://help.salesforce.com/s/articleView?id=platform.flow_build_logic_fault.htm&release=264.0.0&type=5 "Learn how fault paths customize what happens when a flow fails. Choose how to notify admins, guide users, and take a follow-up action.")
- [Flow Resources](https://help.salesforce.com/s/articleView?id=platform.flow_ref_resources.htm&release=264.0.0&type=5 "Each resource represents a value that you can reference throughout the flow.")