FlowDefinition

The parent of a set of flow versions.

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

  • You can activate and deactivate flows with the Metadata field.
  • 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.

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.

Important

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

Note

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.

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.

Important

Version 

Introduced in API version 34.0.

Supported SOAP API Calls 

describeSObjects(), query(), retrieve(), update()

Supported REST API Methods 

GET, HEAD, PATCH, Query

Fields 

ActiveVersionId 

  • Type: reference

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The ID of the active flow version.

  • Relationship name: ActiveVersion

  • Relationship type: relationship

  • Refers to: InteractionDefinitionVersion

ApiVersion 

  • Type: int
  • Required: No
  • Properties: Filter, Group, Nillable, Sort
  • Introduced: API version 59.0

Description 

  • Type: textarea

  • Required: No

  • Properties: Nillable

  • Description: Flow definition information, specified by the org’s admin.

DeveloperName 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Sort

  • Description: Developer name of this flow definition. In the UI, the label is Flow API Name.

FullName 

  • Type: string

  • Required: No

  • Properties: Create, Group, Nillable

  • Introduced: API version 34.0

  • Description: The full name of the flow definition in the Metadata API.

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.

LatestVersionId 

  • Type: reference

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: ID of the latest flow version, regardless of the flow’s status.

  • Relationship name: LatestVersion

  • Relationship type: relationship

  • Refers to: InteractionDefinitionVersion

ManageableState 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Description: Indicates the manageable state of the specified component that is contained in a package:

  • beta

  • deleted

  • deprecated

  • deprecatedEditable

  • installed

  • installedEditable

  • released

  • unmanaged

This field is available in API version 38.0 and later.

  • Possible values:

    • beta — beta

    • deleted — deleted

    • deprecated — deprecated

    • deprecatedEditable — deprecatedEditable

    • installed — installed

    • installedEditable — installedEditable

    • released — released

    • unmanaged — unmanaged

MasterLabel 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: Label for the flow definition. In the UI, this field’s label is Flow Label.

Metadata 

  • Type: complexvalue

  • Required: No

  • Properties: Create, Nillable, Update

  • Introduced: API version 34.0

  • Description: The flow definition’s metadata object, containing information about which flow version is active and the flow definition’s description.

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.

NamespacePrefix 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The namespace associated with this flow definition.

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!