---
schema_version: "1"
id: a1725e14ddc679ac38b39c8946d99baff87ac385d59b630f5d70d5f807edcc2c
title: Flow
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_tooling/tooling_api_objects_flow.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_flow.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4e86569ed951eed5f5bb585755ba89642ff532cd8adf365eed43576175600553
description: Use the Flow object to retrieve and update specific flow versions.
---
# Flow

Use the Flow object to retrieve and update specific flow versions.

With Flow, you can create an application that navigates users through a series of screens to query and update records in the database. You can also execute logic and provide branching capability based on user input to build dynamic applications. For information about the corresponding UI-based flow building tool, see [Flow Builder](https://help.salesforce.com/articleView?id=flow_builder.htm&language=en_US "HTML (New Window)") in Salesforce Help.

When using the Tooling API to work with flows, consider that:

![Note](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/images/icon_note.png)

#### Note

Legacy flows created with the Desktop Flow Designer can’t be modified with the API. Update your flow by recreating it with Flow Builder.

- You can describe information for a flow installed from a managed package but not its metadata.
- Every time you update a flow version, you actually delete the existing flow version and create a flow version from it, with a new ID.
- To activate a flow, change the Status field to active.

You can delete a flow version as long as it isn’t active and has no paused interviews. If the flow version has paused interviews, wait for those interviews to resume and finish, or delete them.

This object is available in API version 34.0 and later.

## Supported SOAP Calls

create(), delete(), query(), retrieve(), update(), upsert()

## Supported REST API HTTP Methods

DELETE, GET, HEAD, PATCH, POST

## Fields

<table class="featureTable sort_table" summary="">


          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d165631e134">Field</th>

              <th class="featureTableHeader  " id="d165631e137">Details</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d165631e134" data-title="Field"><span class="keyword parmname">ApiVersion</span></td>

              <td class="entry" headers="d165631e137" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">double</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Nillable</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">The API version that defines the execution behavior of
                    the flow. Available in API version 50.0 and later. Flows
                    created before API version 50.0 display an API version
                    of 0 on the Flows list view in Setup. To display the
                    correct API version number, create another version of
                    the flow, and set the API version for running the flow
                    to 49.0 or later.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d165631e134" data-title="Field"><span class="keyword parmname">Definition</span></td>

              <td class="entry" headers="d165631e137" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_flowdefinition.htm" title="The parent of a set of flow versions.">
                      FlowDefinition</a></dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">This flow’s definition object.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d165631e134" data-title="Field"><span class="keyword parmname">DefinitionId</span></td>

              <td class="entry" headers="d165631e137" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">ID</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">The ID of this flow’s FlowDefinition.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d165631e134" data-title="Field"><span class="keyword parmname">Description</span></td>

              <td class="entry" headers="d165631e137" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">string</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">A description of the flow, such as what it’s meant to do
                    or how it works.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d165631e134" data-title="Field"><span class="keyword parmname">Environments</span></td>

              <td class="entry" headers="d165631e137" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">multipicklist</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Nillable</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Indicates where a flow can run. Valid values are:<ul class="ul bulletList">
                      <li class="li">
                        <samp class="codeph nolang">Default</samp>—The flow can run from a
                        Visualforce component, Lightning page, flow
                        action, or custom Aura component.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">Offline</samp>—The flow can run only
                        offline. Flow types that support offline flows
                        must set this value. This value is available in
                        API version 62.0 and later.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">Slack</samp>—The flow can run in Slack
                        and the default environment. You specify the Slack
                        flow environment when you save the flow.
                      </li>

                    </ul>
                    Available in API version 55.0
                    and later.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d165631e134" data-title="Field"><span class="keyword parmname">FullName</span></td>

              <td class="entry" headers="d165631e137" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">string</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Create, Group, Nillable</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">The full name of the flow in the Metadata API.<p class="p">A
                      unique name for the flow that contains only
                      underscores and alphanumeric characters. The name
                      must be unique across the org, begin with a letter,
                      not include spaces, not end with an underscore, and
                      not contain two consecutive underscores.</p>
                  </dd>

                  <dd class="dd">Query this field only if the query result contains no
                    more than one record. Otherwise, an error is returned.
                    If more than one record exists, use multiple queries to
                    retrieve the records. This limit protects
                    performance.</dd>

                  <dd class="dd">To deploy or retrieve a version, you can specify the
                    version number. For example, <samp class="codeph nolang">sampleFlow-3</samp> specifies version 3 of the
                    flow whose unique name is sampleFlow. If you don’t
                    specify a version number, the flow is the latest
                    version.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d165631e134" data-title="Field"><span class="keyword parmname">IsTemplate</span></td>

              <td class="entry" headers="d165631e137" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">boolean</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Defaulted on create, Filter, Group, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Indicates whether the process or flow is a template.
                    When installed from managed packages, processes and
                    flows can’t be viewed or cloned by subscribers because
                    of intellectual property (IP) protection. But when those
                    processes and flows are templates, subscribers can open
                    them in a builder, clone them, and customize the clones.
                    Available in API version 45.0 and later.<p class="p">Default:
                      false</p>
                  </dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d165631e134" data-title="Field"><span class="keyword parmname">ManageableState</span></td>

              <td class="entry" headers="d165631e137" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">ManageableState enumerated list</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Restricted picklist, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Indicates the manageable state of the specified component that is contained
                    in a package: <ul class="ul bulletList">
                      <li class="li"><samp class="codeph nolang">beta</samp></li>

                      <li class="li"><samp class="codeph nolang">deleted</samp></li>

                      <li class="li"><samp class="codeph nolang" id="d4368e465-d4404e373"><a name="d4368e465-d4404e373"><!-- --></a>deprecated</samp></li>

                      <li class="li"><samp class="codeph nolang">deprecatedEditable</samp></li>

                      <li class="li"><samp class="codeph nolang">installed</samp></li>

                      <li class="li"><samp class="codeph nolang">installedEditable</samp></li>

                      <li class="li"><samp class="codeph nolang">released</samp></li>

                      <li class="li"><samp class="codeph nolang">unmanaged</samp></li>

                    </ul>
                  </dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d165631e134" data-title="Field"><span class="keyword parmname">MasterLabel</span></td>

              <td class="entry" headers="d165631e137" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">string</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, idLookup, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">Label for the flow. In the UI, this field is Flow
                    Label.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d165631e134" data-title="Field"><span class="keyword parmname">Metadata</span></td>

              <td class="entry" headers="d165631e137" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_visual_workflow.htm" target="_blank" title="HTML (New Window)"><samp class="codeph nolang">mns:</samp> Flow</a></dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Create, Nillable, Update</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">The flow’s metadata.</dd>

                  <dd class="dd">Query this field only if the query result contains no
                    more than one record. Otherwise, an error is returned.
                    If more than one record exists, use multiple queries to
                    retrieve the records. This limit protects performance.
                    If the flow is part of a managed package, this field is
                    Null. Metadata isn’t returned for flows in managed
                    packages, unless the flows are templates.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d165631e134" data-title="Field"><span class="keyword parmname">ProcessType</span></td>

              <td class="entry" headers="d165631e137" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">Restricted picklist</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">The type of the flow. Valid values are:<ul class="ul bulletList">
                      <li class="li">
                        <samp class="codeph nolang">ActivityObjectMatchingFlow</samp>—A flow
                        that launches when Einstein Activity Capture
                        detects and captures a new activity, such as an
                        email. This type of flow runs in the background
                        without user interaction. This value is available
                        with Sync Email as Salesforce Activity in API
                        version 64.0 and later.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">Appointments</samp>—A flow for Lightning
                        Scheduler. This value is available in API version
                        44.0 and later.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">ApprovalWorkflow</samp>—A flow that's
                        used to manage Approval Processes in Revenue
                        Cloud. This value is available in API version 61.0
                        and later.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang" id="processtype_autolaunched"><a name="processtype_autolaunched"><!-- --></a>AutoLaunchedFlow</samp>—A flow that
                        doesn’t require user interaction.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">CheckoutFlow</samp>—A flow used in
                        Lightning B2B Commerce to create a checkout in a
                        store. This value is available in API version 48.0
                        and later.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">ContactRequestFlow</samp>—A flow that
                        lets customers request that customer support get
                        back to them. This flow is used to create contact
                        request records. This value is available in API
                        version 45.0 and later.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">CustomerLifecycle</samp>—A
                        Salesforce Surveys flow that lets you associate
                        survey questions with different stages in customer
                        lifecycles. This value is available in API version
                        49.0 and later and only when the Customer
                        Lifecycle Designer license is enabled.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">CustomEvent</samp>—A process that is
                        invoked when it receives a platform event message.
                        In the UI, it’s an event process. This value is
                        available in API version 41.0 and later.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">FieldServiceMobile</samp>—A flow for the
                        Field Service mobile app. This value is available
                        in API version 39.0 and later.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">FieldServiceWeb</samp>—A flow for
                        embedded Appointment Booking. Its UI label is
                        Field Service Embedded Flow. This value is
                        available in API version 41.0 and later.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang" id="processtype_flow"><a name="processtype_flow"><!-- --></a>Flow</samp>—A flow
                        that requires user interaction because it contains
                        one or more screens or local actions, choices, or
                        dynamic choices. In the UI and Salesforce Help,
                        it’s a screen flow. Screen flows can be launched
                        from the UI, such as with a flow action, Lightning
                        page, or web tab.
                      </li>

                      <li class="li"><span class="ph" id="enumprocesstype_fsclending"><a name="enumprocesstype_fsclending"><!-- --></a><samp class="codeph nolang" id="processtype_fsclending"><a name="processtype_fsclending"><!-- --></a>FSCLending</samp>—A flow for Financial
                          Services Cloud Mortgage. This value is available
                          in API version 46.0 and later.</span></li>

                      <li class="li">
                        <samp class="codeph nolang">IndicatorResultFlow</samp>—A flow for
                        Outcome Management that calculates and creates
                        indicator results for a selected indicator
                        performance period. This value is available with
                        the Outcome Management license in API version 60.0
                        and later.
                      </li>

                      <li class="li"><span class="ph" id="loginflow"><a name="loginflow"><!-- --></a><samp class="codeph nolang">FSCLending</samp>—A flow for login. This
                          value is available in API version 51.0 and
                          later.</span></li>

                      <li class="li">
                        <samp class="codeph nolang">IdentityUserRegistrationFlow</samp>—A
                        flow that creates users when they register and
                        updates existing users when they log in via a
                        single sign-on process that uses the
                        authentication provider framework. Available in
                        API version 64.0 and later.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">InvocableProcess</samp>—A process
                        that can be invoked by another process or the
                        Invocable Actions resource in REST API. This value
                        is available in API version 38.0 and
                        later.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">LoyaltyManagementFlow</samp>—A flow
                        for the Loyalty Management app and can be invoked
                        by loyalty program processes. This value is
                        available in API version 54.0 and later.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">PromptFlow</samp>—A flow for Prompt
                        Builder. Pass data between Prompt Builder and the
                        flow. This value is available in API version 60.0
                        and later.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">RoutingFlow</samp>—A flow for
                        Salesforce Omni-Channel routing and other business
                        logic. This value is available in API version 52.0
                        and later.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">Survey</samp>—A flow for Salesforce
                        Surveys. From the UI, this type of flow is created
                        in Survey Builder. This value is available in API
                        version 42.0 and later.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">SurveyEnrich</samp>—A Salesforce
                        Surveys flow that uses the Survey Data Mapper.
                        From the UI, this type of flow is created in the
                        Survey Builder and requires an associated survey
                        flow type. This value is available in API version
                        49.0 or later and only when the Customer Lifecycle
                        Designer license is enabled.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">Workflow</samp>—A process that is
                        invoked when a record is created or edited. In the
                        UI and Salesforce Help, it’s a record change
                        process.
                      </li>

                    </ul>
                    <p class="p">These values are reserved for future use.</p>
                    <ul class="ul bulletList">
                      <li class="li"><samp class="codeph nolang">ActionPlan</samp></li>

                      <li class="li"><samp class="codeph nolang">AppProcess</samp></li>

                      <li class="li"><samp class="codeph nolang">CartAsyncFlow</samp></li>

                      <li class="li"><samp class="codeph nolang">DigitalForm</samp></li>

                      <li class="li"><samp class="codeph nolang">Journey</samp></li>

                      <li class="li"><samp class="codeph nolang">JourneyBuilderIntegration</samp></li>

                      <li class="li"><samp class="codeph nolang" id="flow_process_loginflow"><a name="flow_process_loginflow"><!-- --></a>LoginFlow</samp></li>

                      <li class="li"><samp class="codeph nolang">ManagedContentFlow</samp></li>

                      <li class="li"><samp class="codeph nolang">OrchestrationFlow</samp></li>

                      <li class="li"><samp class="codeph nolang">RecommendationStrategy</samp></li>

                      <li class="li"><samp class="codeph nolang">SalesEntryExperienceFlow</samp></li>

                      <li class="li"><samp class="codeph nolang">TransactionSecurityFlow</samp></li>

                      <li class="li"><samp class="codeph nolang">UserProvisioningFlow</samp></li>

                    </ul>
                  </dd>

                  <dd class="dd">This value has significant impact on validation when
                    saving the flow and on the flow’s runtime behavior.
                    Don’t change this value unless you understand the flow
                    properties of the specified type.</dd>


                </dl>

                <p class="p">Across flow versions, you can change the type only from <samp class="codeph nolang">Flow</samp> to <samp class="codeph nolang">AutoLaunchedFlow</samp> or vice versa.
                  Before you change the flow type, make sure that the flow
                  contains only elements, resources, and functionality that the
                  new flow type supports.</p>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d165631e134" data-title="Field"><span class="keyword parmname">RunInMode</span></td>

              <td class="entry" headers="d165631e137" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">picklist</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Nillable, Restricted picklist, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">The mode that the flow runs in. Valid values are:<ul class="ul bulletList">
                      <li class="li">
                        <samp class="codeph nolang">DefaultMode</samp>
                        — The flow version runs in system or user
                        context, depending on how the flow is
                        launched.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">SystemModeWithSharing</samp> — The flow
                        version always runs in system mode with sharing.
                        The flow respects org-wide default settings, role
                        hierarchies, sharing rules, manual sharing, teams,
                        and territories. But it doesn’t respect object
                        permissions, field-level access, or other
                        permissions of the running user.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">SystemModeWithoutSharing</samp> — The
                        flow version always runs in system mode without
                        sharing. The flow can access all data.
                      </li>

                      <li class="li">
                        <samp class="codeph nolang">UserMode</samp> — The flow version
                        runs with the user's security context explicitly
                        enforced, without inheriting sharing settings
                        from the calling context. This value is
                        available in API version 68.0 and later.
                      </li>

                    </ul>
                    Available in API version 48.0 and later.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d165631e134" data-title="Field"><span class="keyword parmname">Status</span></td>

              <td class="entry" headers="d165631e137" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">Restricted picklist</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">The flow’s status.<ul class="ul bulletList">
                      <li class="li"><samp class="codeph nolang">Active</samp></li>

                      <li class="li"><samp class="codeph nolang">Draft</samp></li>

                      <li class="li"><samp class="codeph nolang">Obsolete</samp></li>

                      <li class="li"><samp class="codeph nolang">UnderReview</samp></li>

                      <li class="li"><samp class="codeph nolang">InvalidDraft</samp></li>

                    </ul>
                  </dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d165631e134" data-title="Field"><span class="keyword parmname">TimeZoneSidKey</span></td>

              <td class="entry" headers="d165631e137" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">string</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Nillable</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">The ID that defines the time zone in which the flow
                    runs. Available in API version 56.0 and later.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d165631e134" data-title="Field"><span class="keyword parmname">VersionNumber</span></td>

              <td class="entry" headers="d165631e137" data-title="Details">
                <dl class="dl detailList">

                  <dt class="dt dlterm">Type</dt>

                  <dd class="dd">int</dd>



                  <dt class="dt dlterm">Properties</dt>

                  <dd class="dd">Filter, Group, Sort</dd>



                  <dt class="dt dlterm">Description</dt>

                  <dd class="dd">The flow’s version number.</dd>


                </dl>

              </td>

            </tr>

          </tbody>

        </table>