---
schema_version: "1"
id: af2078acb95594b6244ebc634f2fbee5ec3b53bcd37262e1245f48e200631829
title: FlowDefinition
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_tooling/tooling_api_objects_flowdefinition.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_flowdefinition.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 991f4a282b87dd063ef7b4d27ec83e0bd0bc5a7163063795c6cc6801ab15dd04
description: The parent of a set of flow versions.
---
# FlowDefinition

The parent of a set of flow versions.

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

#### Important

Where possible, we changed noninclusive terms to align with our company value of Equality. Because changing terms in our code can break current implementations, we maintained this object’s name.

When using the Tooling API to work with flow definitions, 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 activate and deactivate flows with the Metadata field.
    
    ![Important](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/images/icon_note_important.png)
    
    #### Important
    
    In API version 44.0, we recommend upgrading your flows to flow metadata file names without version numbers and discontinue using the FlowDefinition object to activate or deactivate a flow. Then use the Flow object to activate or deactivate a flow. For more information, see [Upgrade Flow Files to API Version 44.0](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_visual_workflow.htm "HTML (New Window)").
    
    If you deploy with flow definitions, the active version numbers in the flow definitions override the status fields in the flows. For example, the active version number in the flow definition is version 3, and the latest version of the flow is version 4 with the status field as Active. After you deploy your flow, the active version is version 3.
- You can update masterlabel and description of a FlowDefinition.
- FlowDefinition are implicitly created when the Flow object is created, which means FlowDefinition objects can only be updated.

This object is available in API version 34.0 and later.

## Supported SOAP API Calls

query(), retrieve(), update()

## Supported REST API HTTP Methods

GET, HEAD, PATCH, POST

## Fields

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


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

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

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d167579e137" data-title="Field Name"><span class="keyword parmname">ActiveVersion</span></td>

              <td class="entry" headers="d167579e140" 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_flow.htm" title="Use the Flow object to retrieve and update specific flow versions.">Flow</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">The active flow version object.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d167579e137" data-title="Field Name"><span class="keyword parmname">ActiveVersionId</span></td>

              <td class="entry" headers="d167579e140" 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, Nillable, Sort</dd>



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

                  <dd class="dd">The ID of the active flow version.</dd>


                </dl>

              </td>

            </tr>

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

              <td class="entry" headers="d167579e140" 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">Flow definition information, specified by the org’s admin.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d167579e137" data-title="Field Name"><span class="keyword parmname">DeveloperName</span></td>

              <td class="entry" headers="d167579e140" 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, Sort</dd>



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

                  <dd class="dd">Developer name of this flow definition. In the UI, the label is Flow API Name.</dd>


                </dl>

              </td>

            </tr>

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

              <td class="entry" headers="d167579e140" 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 definition in the Metadata API.</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>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d167579e137" data-title="Field Name"><span class="keyword parmname">LatestVersion</span></td>

              <td class="entry" headers="d167579e140" 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_flow.htm" title="Use the Flow object to retrieve and update specific flow versions.">Flow</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">The latest flow version object, regardless of the status.</dd>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d167579e137" data-title="Field Name"><span class="keyword parmname">LatestVersionId</span></td>

              <td class="entry" headers="d167579e140" 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, Nillable, Sort</dd>



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

                  <dd class="dd">ID of the latest flow version, regardless of the flow’s status.</dd>


                </dl>

              </td>

            </tr>

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

              <td class="entry" headers="d167579e140" 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="d4471e434-d4499e373"><a name="d4471e434-d4499e373"><!-- --></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>

                <p class="p">This field is available in API version 38.0 and later.</p>

              </td>

            </tr>

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

              <td class="entry" headers="d167579e140" 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">Label for the flow definition. In the UI, this field’s label is Flow Label.</dd>


                </dl>

              </td>

            </tr>

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

              <td class="entry" headers="d167579e140" 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_flowdefinition.htm" target="_blank" title="HTML (New Window)"><samp class="codeph nolang">mns:</samp>FlowDefinition</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 definition’s metadata object, containing information about which flow version
                    is active and the flow definition’s description.</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>


                </dl>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d167579e137" data-title="Field Name"><span class="keyword parmname">NamespacePrefix</span></td>

              <td class="entry" headers="d167579e140" 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">The namespace associated with this flow definition.</dd>


                </dl>

              </td>

            </tr>

          </tbody>

        </table>