Newer Version Available
Flow
For information about the corresponding UI-based flow building tool, see “Flow Builder” in Salesforce Help.
- You can’t use Metadata API to access a flow installed from a managed package, unless the flow is a template.
- Spaces in flow file names can cause errors at deployment. Heading and trailing spaces are allowed, but are trimmed during deployment.
- When using Metadata API, you can deploy changes to active flows in specific situations.
- The org isn’t a production org (for example, a scratch org or sandbox). The active flow is the latest version.
- The org is a production org that enabled the Deploy processes and flows as active preference. The active flow is the latest version.
-
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.
Declarative Metadata File Suffix and Directory Location
Flows are stored in the Flow directory of the corresponding package directory. The file name matches the flow’s unique full name, and the extension is .flow.
Version
The flow Metadata API is available in API version 24.0 and later.
Flow
This metadata type represents a valid definition of a flow. This type extends the Metadata metadata type and inherits its fullName field.
| Field Name | Field Type | Description |
|---|---|---|
| actionCalls | FlowActionCall[] | An array of nodes that define calls to actions. This field is available in API version 31.0 and later. |
| apexPluginCalls | FlowApexPluginCall[] | An array of nodes that define calls to Apex plug-ins. |
| assignments | FlowAssignment[] | An array of assignment nodes. |
| choices | FlowChoice[] | An array of static choice options. |
| constants | FlowConstant[] | An array of constants. |
| decisions | FlowDecision[] | An array of decision nodes. |
| description | string | Description of the flow. |
| dynamicChoiceSets | FlowDynamicChoiceSet[] | An array that constructs a set of choice options based on a database lookup. |
| formulas | FlowFormula[] | An array of formulas. |
| fullName | string | Required; inherited from the Metadata component. Name of the file
in Metadata API. 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. To deploy or retrieve a version, you can specify the version number. For example, sampleFlow-3 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. In API version 43.0 and earlier, this field included the version number. In API version 44 and later, this field no longer includes the version number. |
| interviewLabel | string |
Label for the interview. This label
helps users and administrators differentiate interviews from the
same flow. In the user interface, this label appears in the Paused Flow Interviews component on the user’s Home tab and in the list of paused flow interviews in Setup. |
| isAdditionalPermissionRequiredToRun | boolean | Indicates whether to override the default behavior and restrict access to enabled profiles or permission sets (true) or not (false). The default value is (false). Available in API version 47.0 and later. |
| isTemplate | boolean |
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. Default: false |
| label | string | Required. Label for the flow. |
| loops | FlowLoop[] | An array of nodes for iterating through collections. This field is available in API version 30.0 and later. |
| processMetadataValues | FlowMetadataValue[] |
Metadata values for the flow.
This field is available in API version 31.0 and later. |
| processType | FlowProcessType (enumeration of type string) |
The type of the flow, as determined by
the active version (or latest version, if there’s no active
version).
Valid values are:
Across flow versions, you can change the type only from Flow to AutolaunchedFlow 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. This field is available in API version 31.0 and later. |
| recordCreates | FlowRecordCreate[] | An array of nodes for creating records in the database. |
| recordDeletes | FlowRecordDelete[] | An array of nodes for deleting records in the database. |
| recordLookups | FlowRecordLookup[] | An array of nodes for looking up records in the database. |
| recordUpdates | FlowRecordUpdate[] | An array of nodes for updating records in the database. |
| screens | FlowScreen[] | An array of screen nodes. |
| stages | FlowStage[] | An array of stages that you can use throughout the flow. This field is available in API version 42.0 and later. |
| start | FlowStart | Represents the flow’s Start element, which specifies how and when the flow starts. This field is available in API version 47.0 and later. |
| startElementReference | string | Specifies which node or element is the starting point in the
flow. This field isn’t used in flows that are created or saved in Flow Builder in Winter ’20 and later. Those flows use the start field instead to specify how the flow starts. |
| status | FlowVersionStatus (enumeration of type string) | The activation status of the flow. Valid values are:
|
| steps | FlowStep[] | An array of step nodes. |
| subflows | FlowSubflow[] | An array of subflows. This field is available in API version 25.0 and later. |
| textTemplates | FlowTextTemplate[] | An array of text templates. |
| variables | FlowVariable[] | An array of variable definitions. |
| waits | FlowWait[] | An array of wait nodes. This field is available in API version 32.0 and later. |
FlowActionCall
Defines a call to an action from the flow. It extends FlowNode.
Available in API version 31.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| actionName | string | Required. Name for the action. Must be unique across actions with the same actionType. |
| actionType | InvocableActionType (enumeration of type string) | Required. The action type. Valid values are:
|
| connector | FlowConnector | Specifies which node to execute after this action call. |
| faultConnector | FlowConnector | Specifies which node to execute if the action call results in an error. |
| inputParameters | FlowActionCallInputParameter[] | An array of input parameters from the flow to the action. |
| outputParameters | FlowActionCallOutputParameter[] | An array of output parameters from the action to the flow. |
FlowActionCallInputParameter
Defines an input parameter from the flow to the action. It extends FlowBaseElement and inherits all its fields. Available in API version 31.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| name | string | Required. Unique name for the input parameter. |
| value | FlowElementReferenceOrValue | Defines the value of the input parameter. |
FlowActionCallOutputParameter
Defines an output parameter from the action to the flow. It extends FlowBaseElement and inherits all its fields. Available in API version 31.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| assignToReference | string | Required. Specifies the variable to which you want to assign the output parameter value. |
| name | string | Required. Unique name for the output parameter. |
FlowApexPluginCall
Defines a call to an Apex plug-in from the flow. It extends FlowNode and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| apexClass | string | Required. The name of the Apex class. |
| connector | FlowConnector | Specifies which node to execute after this Apex plug-in call. |
| faultConnector | FlowConnector | Specifies which node to execute if the Apex plug-in call results in an error. |
| inputParameters | FlowApexPluginCallInputParameter[] | An array of input parameters from the flow to the Apex plug-in. |
| outputParameters | FlowApexPluginCallOutputParameter[] | An array of output parameters from the Apex plug-in to the flow. |
FlowApexPluginCallInputParameter
Defines an input parameter from the flow to the Apex plug-in. It extends FlowBaseElement and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| name | string | Required. Unique name for the input parameter. |
| value | FlowElementReferenceOrValue | Defines the value of the input parameter. |
FlowApexPluginCallOutputParameter
Defines an output parameter from the Apex plug-in to the flow. It extends FlowBaseElement and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| assignToReference | string | Required. Specifies the variable to which you want to assign the output parameter value. |
| name | string | Required. Unique name for the output parameter. |
FlowAssignment
Defines an assignment node that can dynamically change the value of a variable in the flow. It extends FlowNode and inherits all of its fields.
| Field Name | Field Type | Description |
|---|---|---|
| assignmentItems | FlowAssignmentItem[] | An array of assignment operations that is executed in the given order, starting from the index 0. |
| connector | FlowConnector | Specifies which node to execute after this assignment node. |
FlowAssignmentItem
Defines an operation to apply to a variable. It extends FlowBaseElement and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| assignToReference | string | Required. Reference to the variable to which you want to apply the specified operator. |
| operator | FlowAssignmentOperator (enumeration of type string) | Required. Operation to apply to the variable reference in the assignToReference field. For valid values, see FlowAssignmentOperator. |
| value | FlowElementReferenceOrValue | Defines the value that you want the operator to apply to the variable reference in the assignToReference field. |
FlowAssignmentOperator
An enumeration of type string that specifies the operation to apply to the variable in the assignToReference field. See “Flow Operators in Assignment Elements” in Salesforce Help.
Valid values are:
| Enumeration Value | Description |
|---|---|
| Add | When the assignToReference field is a
variable of type number or currency, this operator adds the
value to the variable. When the assignToReference field is a variable of type date, this operator adds the value in days to the variable. When the assignToReference field is a variable of type string, this operator appends the value to the end of the string. When the assignToReference field is a variable of type picklist, this operator appends the value to the end of the last item in the picklist. When the assignToReference field is a variable of type multipicklist, this operator appends the value to the end of the last item in the multi-select picklist. To instead add an item to the end of the multi-select picklist, use the AddItem operator. When the assignToReference field is the $Flow.ActiveStages global variable, this operator appends the value as a new item at the end of $Flow.ActiveStages. When the assignToReference field is a collection variable, this operator appends the value to the end of the collection. Support for a collection variable as the value is available in API version 43.0 and later but only via Metadata API. From Flow Builder, you can’t save an Assignment element that contains a collection variable in the Value column for the Add operator. The Add operator is not supported when the assignToReference field is a variable of type boolean, dateTime, or sObject. |
| AddAtStart | Supported only when the assignToReference field is a collection variable or the $Flow.ActiveStages global variable. Adds the value as a new item at the beginning of the collection. When the value is a collection variable, the operator adds all items at the beginning of the collection. This operator is available in API version 43.0 and later. |
| AddItem | Supported only when the assignToReference field is a variable of type multipicklist. Adds the value to the picklist, including the semi-colon that’s required to mark a value as a separate item. This operator is available in API version 34.0 and later. |
| Assign | Assigns the value to the variable in the assignToReference field. |
| AssignCount | Supported only when the value is a collection variable or the $Flow.ActiveStages global variable. Counts the number of stages or items in the collection and assigns that number to the variable in the assignToReference field. Corresponds to equals count in the user interface. This operator is available in API version 43.0 and later. |
| RemoveAfterFirst | Supported only when the assignToReference field is a collection variable or the $Flow.ActiveStages global variable. Finds the first instance of the value within the variable in the assignToReference field. Removes everything after that first instance from the variable. This operator is available in API version 43.0 and later. |
| RemoveAll | Supported only when the assignToReference field is a collection variable or the $Flow.ActiveStages global variable. Removes all instances of the value from the variable in the assignToReference field. When the value is a collection variable, the operator removes all instances of each item from the variable in the assignToReference field. This operator is available in API version 43.0 and later. |
| RemoveBeforeFirst | Supported only when the assignToReference field is a collection variable or the $Flow.ActiveStages global variable. Finds the first instance of the value within the variable in the assignToReference field. Removes everything before that first instance from the variable. This operator is available in API version 43.0 and later. |
| RemoveFirst | Supported only when the assignToReference field is a collection variable or the $Flow.ActiveStages global variable. Removes the first instance of the value from the variable in the assignToReference field. This operator is available in API version 43.0 and later. |
| RemovePosition | Supported only when the assignToReference
field is a collection variable or the
$Flow.ActiveStages global variable. Removes
the item at the specified position. For example, if the collection
contains three items (Red, Green, Blue) and the
value is 2, the second item (Green) is
removed from the collection variable. This operator is available in
API version 43.0 and later. Make sure that the value at run time is a positive integer within the range of the number of items in the collection variable. |
| RemoveUncommon | Supported only when assignToReference and value are both collection variables. Keeps items that are in both collections and removes the rest from the collection variable in the assignToReference field. This operator is available in API version 43.0 and later. |
| Subtract | Supported only when the assignToReference
field is a variable of type currency, date, or number. When the assignToReference field is a variable of type number or currency, this operator subtracts the value from the variable. When the assignToReference field is a variable of type date, this operator subtracts the value in days from the variable. |
FlowChoice
A choice resource is a standalone choice option that you can reference or reuse throughout the flow. It extends FlowElement and inherits all of its fields.
| Field Name | Field Type | Description |
|---|---|---|
| choiceText | string | Required. Choice label to display in the screen. |
| dataType | FlowDataType (enumeration of type string) | Required. Valid types are:
|
| userInput | FlowChoiceUserInput | Enables the choice to allow user input when the choice is selected. Not supported for choices in multi-select fields. |
| value | FlowElementReferenceOrValue | Actual value that’s used during flow execution, for example, in assignments, calls to Apex plug-ins, and record elements. If null, this choice always has the value of null. |
FlowChoiceUserInput
Allows the choice to include a user input field that appears when the choice is selected by the user. User input isn’t supported for choices in multi-select fields. It extends FlowBaseElement and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| isRequired | boolean | Indicates whether users are required to enter something into the field when they select the choice. |
| promptText | string | Text that is displayed to prompt the user for input at runtime. Supports merge fields. |
| validationRule | FlowInputValidationRule | Rule used at runtime to validate the user input. |
FlowCondition
Defines a condition for a rule. It extends FlowBaseElement and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| leftValueReference | string | Required. Unique name of the element that serves as the left side of the condition expression. |
| operator | FlowComparisonOperator (enumeration of type string) | Required. Valid values are:
|
| rightValue | FlowElementReferenceOrValue | Unique name of an element or the actual value (such as text or a number) for the right side of the condition expression. |
FlowConnector
Connectors determine the order in which the nodes of the flow are executed. A connector defines and links to the subsequent node. It extends FlowBaseElement and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| targetReference | string | Required. Which node to execute after completing the current node. |
FlowConstant
A constant resource defines a fixed value that can be used throughout your flow. It extends FlowElement and inherits all of its fields.
| Field Name | Field Type | Description |
|---|---|---|
| dataType | FlowDataType (enumeration of type string) | Required. Valid types are:
|
| value | FlowElementReferenceOrValue | Default value of the constant. This field can't have merge fields, nor can it reference another resource besides $GlobalConstant.EmptyString. |
FlowDecision
Decision node that evaluates a set of rules and routes the flow execution based on the first rule that evaluates to true. It extends FlowNode and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| defaultConnector | FlowConnector | Specifies which node to execute if none of the rules evaluate to true. |
| defaultConnectorLabel | string | Label for the default connector. |
| rules | FlowRule[] | An array of rules for the decision. The rules are evaluated in the order they're listed, and the connector of the first true rule is used. If no rules are true, then the default connector is used. In Flow Builder, rules are referred to as “decision outcomes.” |
FlowDynamicChoiceSet
- A record choice dynamically generates choices based on records that meet specified filter criteria. If a dynamic choice doesn’t have the picklistField and picklistObject parameters set, it is a record choice and can’t have a data type of Picklist or Multipicklist.
- A picklist choice dynamically generates choices based on the available values for a picklist or multi-select picklist field. If a dynamic choice has the picklistField and picklistObject parameters set, it is a picklist choice and must have a data type of Picklist or Multipicklist.
| Field Name | Field Type | Description |
|---|---|---|
| dataType | FlowDataType (enumeration of type string) | Required. Valid types are:
Picklist and Multipicklist are available in API version 35.0 and later. |
| displayField | string | Required for record choices. Specifies the object field. The
values of the object field are displayed to the user as choice
labels for selecting a record. For example, for an account, specify Name in displayField if you want the dynamically generated choices to be displayed as the account names from the records that are retrieved from the database. Not supported for picklist choices. Picklist choices always display the labels for the retrieved picklist values. |
| filters | FlowRecordFilter[] | An array of filters to apply to the records that are retrieved
from the database. For example, filter accounts to include only the
accounts that were created in the past three months. Not supported for picklist choices. |
| limit | int |
Maximum number of choices to include in
the generated set of choices. Maximum and default:
200. If sortField and sortOrder are also specified, the records are sorted before the limit takes effect. This field is available in API version 25.0 and later. This field is nillable in API version 45.0 and later. |
| object | string | Required for record choices. The object whose fields you want to
retrieve from the database and use to generate the set of choices.
For example, use “Account” to dynamically generate
choices from the information in account records in the
database. Not supported for picklist choices. |
| outputAssignments | FlowOutputFieldAssignment[] | An array that assigns fields from the user-selected record to
variables that can be used elsewhere in the flow. For example, when
the user selects an account name from the dynamically generated list
of choice options, outputAssignments can assign the Id and
AnnualRevenue from the user-selected account to variables that you
specify. Not supported for picklist choices. |
| picklistField | string |
Required for picklist choices. The
field whose available values you want to retrieve from the
database and use to generate the picklist choice. For example,
use “Industry” to dynamically generate one choice for each
available value on the Industry picklist field.
Not supported for record choices. This field is available in API version 35.0 and later. |
| picklistObject | string |
Required for picklist choices. The
object whose field metadata you want to retrieve from the
database and use to generate the picklist choice. For example,
use “Account” to dynamically generate choices from a picklist
field on the Account object. Not supported for record choices. This field is available in API version 35.0 and later. |
| sortField | string |
Field that is used for sorting the
records that meet the filter criteria. If this field
isn’t specified, then the returned records are not
sorted. You can only sort records by fields that have the Sort API field property, as specified in SOAP API. Not supported for picklist choices. This field is available in API version 25.0 and later. |
| sortOrder | SortOrder (enumeration of type string) |
Order in which to sort the records.
If this field isn’t specified, then the results are not
sorted.
Not supported for picklist choices. This field is available in API version 25.0 and later. |
| valueField | string | Stored value for the choice, which can differ from what is
displayed to the user as the choice options
(displayField). For example, the
displayField might be the account “Name”
while the valueField is the account “Id.” Not supported for picklist choices. Picklist choices always store the API value for the retrieved picklist values. |
FlowElement
Base class for all flow elements. This is an abstract class. It extends FlowBaseElement and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| description | string | Description of the flow element. |
| name | string | Required. Unique name of the flow element. |
FlowBaseElement
Base class for all flow elements that require contextual information in metadata values. This is an abstract class. FlowBaseElement is available in API version 32.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| processMetadataValues | FlowMetadataValue[] | Contextual information for the element. |
FlowMetadataValue
Defines contextual information that can be passed between elements in a flow. Flow metadata values can be used in an application that produces or consumes flows. FlowMetadataValue is available in API version 31.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| name | string | Required. Name for the metadata value. This name doesn’t need to be unique across all elements. |
| value | FlowElementReferenceOrValue | Reference or value for the metadata value. |
FlowElementReferenceOrValue
Defines a reference to an existing element or a particular value that you specify. Make sure that you specify only one of the fields.
| Field Name | Field Type | Description |
|---|---|---|
| booleanValue | boolean | Use this field to specify a boolean value. Do not use this field if you want to specify a different data type or an element reference. |
| dateTimeValue | dateTime | Use this field to specify a dateTime value. Do not use this field if you want to specify a different data type or an element reference. This field is available in API version 30.0 and later. |
| dateValue | date | Use this field to specify a date value. Do not use this field if you want to specify a different data type or an element reference. |
| elementReference | string | Use this field to specify the name of an existing element. Do not use this field if you want to specify a value instead of an element reference. |
| numberValue | double | Use this field to specify a double value. Do not use this field if you want to specify a different data type or an element reference. |
| stringValue | string | Use this field to specify a string value. Do not use this field if you want to specify a different data type or an element reference. |
FlowFormula
Calculates a value using functions and elements in the flow. It extends FlowElement and inherits all its fields.
FlowInputFieldAssignment
Assigns the value for a record field based on a resource or static value. It extends FlowBaseElement and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| field | string | Required. Name of the field that is to be assigned a value while a record is being created or updated. |
| value | FlowElementReferenceOrValue | Value that is to be assigned to the field. |
FlowInputValidationRule
Validation rules verify that the data entered by the user meets the specified requirements. If the validation rule evaluates to false, then the specified error message is displayed.
FlowLoop
A construct for iterating through a collection. It extends FlowNode and inherits all of its fields. FlowLoop is available in API version 30.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| nextValueConnector | FlowConnector | Points to the element that the flow navigates to for each of the entries in the collection. This is where the flow goes for the next value in the collection. |
| noMoreValuesConnector | FlowConnector | Points to the element to navigate to when all entries in the collection have been looped through. |
| collectionReference | string | Required. The collection being looped through. |
| assignNextValueToReference | string | Required. The variable to which the current value in the collection is assigned before navigating to the target of nextValueConnector. |
| iterationOrder | iterationOrder (enumeration of type string) | Valid values are:
|
FlowNode
A node is a type of element that is visible in the flow diagram. It extends FlowElement and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| label | string | Required. Name of the node. This non-unique label is different from the unique name of the node, which is inherited from FlowElement. |
| locationX | int | Required. Horizontal location of the node, in pixels from the left. |
| locationY | int | Required. Vertical location of the node, in pixels from the top. |
FlowOutputFieldAssignment
Assigns a record field’s value from a record to a variable that can be used elsewhere in the flow. The record may be selected by a record lookup or via a user selection for a choice. It extends FlowBaseElement and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| assignToReference | string | Required. Reference to the variable where you want to store the value of the record field. |
| field | string | Required. Name of the field whose value is to be assigned after a record lookup. |
FlowRecordCreate
| Field Name | Field Type | Description |
|---|---|---|
| assignRecordIdToReference | string | Reference to the variable where you want to store the ID after the record is created. |
| connector | FlowConnector | Specifies which node to execute after creating the record. |
| faultConnector | FlowConnector | Specifies which node to execute if the attempt to create a record results in an error. |
| inputAssignments | FlowInputFieldAssignment[] | An array that assigns values to the specified fields of the record being created. |
| object | string | Required. Object for the record to be created by this element |
| inputReference | string | Specifies the record variable whose field values are used to populate the new record’s fields. |
FlowRecordDelete
| Field Name | Field Type | Description |
|---|---|---|
| connector | FlowConnector | Specifies which node to execute after deleting the record. |
| faultConnector | FlowConnector | Specifies which node to execute if the attempt to delete a record results in an error. |
| filters | FlowRecordFilter[] | An array that specifies the criteria used to select which records to delete from the database. For example, delete accounts whose last activity was older than a specified date. |
| object | string | Required. The name of the object whose records are deleted. |
| inputReference | string | Specifies the record variable whose record ID is used to identify which record to delete in the database. |
FlowRecordFilter
Sets the criteria for searching records in the database. It extends FlowBaseElement and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| field | string | Required. The field to be used for filtering records. |
| operator | FlowRecordFilterOperator (enumeration of type string) | Required. Valid values are:
|
| value | FlowElementReferenceOrValue | Reference or value used with the field and operator to filter records. |
FlowRecordLookup
| Field Name | Field Type | Description |
|---|---|---|
| assignNullValuesIfNoRecordFound | boolean | Specifies that all values are set to null when no record is found. Supported only when
storeOutputAutomatically is false. This field is available in API version 30.0 and later. |
| connector | FlowConnector | Specifies which node to execute after getting records from the database. |
| faultConnector | FlowConnector | Specifies which node to execute if the attempt to get records results in an error. |
| filters | FlowRecordFilter[] | An array that specifies the criteria used to select the record
from the database. If the filters return more than one record, they are sorted according to the specified sortField and sortOrder. If outputReference specifies a non-collection record variable or if getFirstRecordOnly is true, only the first record in the sorted list is selected. If sortField or sortOrder is not specified, records are not returned in any particular order. If outputReference specifies a non-collection record variable or if getFirstRecordOnly is true, only the first record in the unsorted list is selected. |
| getFirstRecordOnly | boolean | Indicates whether to store field values for only one record, even
when multiple records meet the filter criteria. Supported only when
storeOutputAutomatically is true. When
storeOutputAutomatically is false, what determines whether one
or multiple records are stored is whether
outputReference specifies a record variable
or a record collection variable. This field is available in API version 47.0 and later. |
| limit | int | The maximum number of records to return, to limit the amount of data received. This field is available in API version 30.0 and later. |
| object | string | Required. Name of the object from which to select the record. |
| outputAssignments | FlowOutputFieldAssignment[] | An array that assigns fields from the selected record to variables that can be used elsewhere in the flow. Supported only when storeOutputAutomatically is false. |
| outputReference | string | Specifies the record variable or record collection variable that stores the queried fields’ values. Supported only when storeOutputAutomatically is false. |
| queriedFields | string[] | An array that specifies which fields from the selected record is saved to the specified record variable. |
| sortField | string | Field that is used for sorting the
records that meet the filter criteria. If this field
isn’t specified, then the returned records are not
sorted. You can only sort records by fields that have the Sort API field property, as specified in SOAP API. This field is available in API version 25.0 and later. |
| sortOrder | SortOrder (enumeration of type string) | Order in which to sort the records.
If this field isn’t specified, then the results are not
sorted. Valid values are:
This field is available in API version 25.0 and later. |
| storeOutputAutomatically | boolean | Indicates whether the returned records’ field values are
automatically available in the flow without creating any variables.
When the value is true, the
flow can reference a field by specifying the
name of the Get Records element and the
record field, such as Get_Contacts.AccountId. This field is available in API version 47.0 and later. |
FlowRecordUpdate
| Field Name | Field Type | Description |
|---|---|---|
| connector | FlowConnector | Specifies which node to execute after completing the record update. |
| faultConnector | FlowConnector | Specifies which node to execute if the attempt to update a record results in an error. |
| filters | FlowRecordFilter[] | An array that specifies the criteria used to select the records to update in the database. |
| inputAssignments | FlowInputFieldAssignment[] | An array that assigns values to the specified fields of the record being updated. |
| object | string | Required. Name of the object whose records are updated. |
| inputReference | string | Specifies the record variable whose field values are used to update the record’s fields. |
FlowRule
Defines the conditions and logic that would enable a rule to evaluate to true. It extends FlowElement and inherits all of its fields.
| Field Name | Field Type | Description |
|---|---|---|
| conditionLogic | string | Specifies logic for the conditions. Value can be:
|
| conditions | FlowCondition[] | An array of conditions for the rule. |
| connector | FlowConnector | Specifies which node to execute if this is the first rule that evaluates to true in a decision. |
| label | string | Required. Label for the connector. |
FlowScreen
Screens capture information from users and display information to users. It extends FlowNode and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| allowBack | boolean | Indicates whether to show (true) or hide (false) the
Previous button on the screen at runtime.
When true, the Previous button appears only
if the user visited a previous screen in the flow path and if
showFooter for the screen is set to true.
Set this to false when revisiting the previous screen would trigger
an action that should not be repeated, such as a credit card
transaction. This field is available in API version 26.0 and later. Default: true You can set either allowBack or allowFinish to false, but not both. |
| allowFinish | boolean | Indicates whether to show (true) or hide (false) the
Finish button on the screen at runtime.
When true, the Finish button appears only if
the screen element is the end of a flow path and if
showFooter for the screen is set to true.
Set this to false if you need the user to go back to a previous
screen to continue or complete the flow. For example, you
wouldn’t want to offer a Finish button
on a screen that tells the user to go back and make corrections on a
previous screen. This field is available in API version 26.0 and later. Default: true You can set either allowBack or allowFinish to false, but not both. |
| allowPause | boolean |
Indicates whether to show (true) or
hide (false) the Pause button on the
screen at runtime. The default value is true.
A flow screen displays the Pause button if
all the following conditions are true.
This field is available in API version 33.0 and later. |
| connector | FlowConnector | Specifies which node to execute after the screen node. |
| fields | FlowScreenField[] | An array of fields to display on the screen. |
| helpText | string | Text that appears if the end user clicks a link for help
text. Supports merge fields in API version 26.0 and later. |
| pausedText | string |
Confirmation message that appears
when an end-user clicks
Pause. This field is available in API version 33.0 and later. |
| rules | FlowScreenRule[] | Reserved for future use. |
| boolean |
The footer includes navigation actions for the screen. If showFooter is hidden, use Lightning components on the screen to show navigation actions. This field is available in API version 42.0 and later. |
|
| showHeader | boolean |
Indicates whether to show (true) or
hide (false) the screen’s header at Lightning runtime.
Classic runtime isn’t supported. The default value is true. The header includes access to help text for the screen. If showHeader is hidden, use Lightning components on the screen to show help text. This field is available in API version 42.0 and later. |
FlowScreenField
Represents a screen component. FlowScreenField extends FlowElement and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| choiceReferences | string[] | An array of references to FlowChoices or FlowDynamicChoiceSets.
The resulting choice options appear in the order specified in this
array, where the element at index 0 provides the top-most choice
option. Supported for the following types of screen components:
Multi-select checkboxes and multi-select picklist fields are available in API version 26.0 and later. |
| dataType | FlowDataType (enumeration of type string) | Data type of the screen component. Only supported for the
InputField, RadioButtons, and DropdownBox types of screen
components. Valid data types are:
Boolean input fields, which appear as checkbox fields at runtime, are available in API version 26.0 and later. Only the string data type is supported for multi-select checkboxes and multi-select picklist fields. Multi-select fields are available in API version 26.0 and later. Date/time input fields are available in API version 43.0 and later. |
| defaultSelectedChoiceReference | string | The name of the FlowChoice element to use as the default value
for the screen component. Supported for the following types of
screen components:
For DropdownBox field types only, if defaultSelectedChoiceReference is empty or null, the reference at index 0 of choiceReferences is used as the default value. You can specify only one FlowChoice element as the default value for multi-select checkboxes and multi-select picklist fields. Multi-select fields are available in API version 26.0 and later. |
| defaultValue | FlowElementReferenceOrValue | The value that is used by default when the screen component requires users to provide input. Only supported for InputField, LargeTextArea, and PasswordField. |
| extensionName | string | The name of the Lightning component to display. This field is available in API version 42.0 and later. |
| fieldText | string | Field label that is displayed on the screen. Supports merge fields. |
| fieldType | FlowScreenFieldType (enumeration of type string) | Required. Valid values are:
At runtime, each multi-select field stores its field value as a concatenation of the user-selected choice values, separated by semicolons. Any semicolons in the selected choice values are removed when added to the multi-select field value. Multi-select checkboxes and multi-select picklist fields are available in API version 26.0 and later. Lightning component fields are available in API version 42.0. |
| helpText | string | Text that appears if the end user clicks the help icon ( ) for the screen component.Supports merge fields in API version 26.0 and later. |
| inputParameters | FlowScreenFieldInputParameter[] | An array of input parameters. Supported only when fieldType is ComponentInstance. This field is available in API version 42.0 and later. |
| isRequired | boolean | Indicates whether the user must select a choice or provide input. Not supported for DisplayText or boolean inputField. |
| isVisible | boolean | Reserved for future use. |
| outputParameters | FlowScreenFieldOutputParameter[] | An array of output parameters. Supported only when
fieldType is ComponentInstance and when
storeOutputAutomatically is false. This field is available in API version 42.0 and later. |
| scale | int | The scale of the screen component if its data type is number or currency. The scale sets the number of digits to the right of the decimal point. |
| storeOutputAutomatically | boolean | Indicates whether the screen component’s output parameters are
automatically available in the flow without creating any variables.
When the value is true, you can
reference an output parameter by specifying the
name of the screen component and the output
parameter, such as Mailing_Address.City. Supported only when fieldType is ComponentInstance. This field is available in API version 47.0 and later. |
| validationRule | FlowInputValidationRule | A rule used to validate the user input when the screen component is of type InputField, LargeTextArea, or PasswordField. |
| visibilityRule | FlowVisibilityRule | A rule based on conditions that is used to render or hide the
screen component. This field is available in API version 47.0 and later. |
FlowScreenFieldInputParameter
Defines an input parameter from the flow to the extension. It extends FlowBaseElement and inherits all its fields. FlowScreenFieldInputParameter is available in API version 42.0.
| Field Name | Field Type | Description |
|---|---|---|
| name | string | Required. Unique name for the input parameter. |
| value | string | Defines the value of the input parameter. |
FlowScreenFieldOutputParameter
Defines an output parameter from the extension to the flow. It extends FlowBaseElement and inherits all its fields. FlowScreenFieldOutputParameter is available in API version 42.0.
| Field Name | Field Type | Description |
|---|---|---|
| assignToReference | string | Required. Specifies the variable to which you want to assign the output parameter value. |
| name | string | Required. Unique name for the output parameter. |
FlowStage
A section of your flow that can be represented in the UI, such as with breadcrumbs. It extends FlowElement and inherits all its fields.
When an interview starts, any stages where isActive is true are added to the $Flow.ActiveStages global variable, which holds a collection of stages. Each stage’s stageOrder determines the order they’re added in. The stage with the lowest stageOrder is assigned to the $Flow.CurrentStage global variable.
| Field Name | Field Type | Description |
|---|---|---|
| isActive | boolean | Indicates whether the stage is active by default. |
| label | string | A user-friendly label for this stage. |
| stageOrder | int | Indicates how the stage should be ordered against other stages. The stageOrder value must be unique within the flow. |
FlowStart
Represents the flow’s Start element, which specifies how the flow starts. In an autolaunched flow, the Start element can also define when and how frequently to run the flow and whether to run the flow for a set of records that meet filter criteria.
FlowStart extends FlowNode and inherits all its fields except name and label. Available in API version 47.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| connector | FlowConnector | Specifies which element to execute first. |
| filters | FlowRecordFilter[] | An array of filters to apply when retrieving records from the database at the scheduled start time. For example, filter accounts to include only the records that haven’t been updated in the last 4 weeks. Available only when triggerType is Scheduled. |
| object | string | The object whose records you want to retrieve from the database. A flow interview starts for each record that meets the filter conditions. Available only when triggerType is Scheduled. |
| schedule | FlowSchedule | Required when triggerType is Scheduled. Specifies when and how frequently the flow runs. |
| triggerType | FlowTriggerType (enumeration of type string) | Specifies what causes the flow to run. If you exclude this field,
the flow has no trigger and starts only when a user or app launches
the flow. Valid value is:
Available only when processType is AutoLaunchedFlow. |
FlowSchedule
Specifies when and how frequently to run the flow. Available in API version 47.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| frequency | FlowStartFrequency (enumeration of type string) | Specifies how frequently to run the flow. Valid values are:
|
| startDate | date | The date when the flow runs, or when the flow’s run schedule starts recurring. |
| startTime | time | The time of day when the flow runs, based on the org’s default time zone. |
FlowStep
Steps function as placeholders when you're building a flow. It extends FlowNode and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| connectors | FlowConnector[] | Specifies which node to execute after the step node. |
FlowSubflow
A subflow element references another flow, which it calls at run time. The flow that contains the subflow element is referred to as the master flow. FlowSubflow extends FlowNode and inherits all of its fields. It is available in API version 25.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| connector | FlowConnector | Specifies which node to execute after the subflow. |
| flowName | string | References the flow to call at runtime. The value must be an API name of a flow and can’t contain an appended hyphen and version number. |
| inputAssignments | FlowSubflowInputAssignment[] | An array of input variable assignments that are set at the start of the referenced flow. |
| outputAssignments | FlowSubflowOutputAssignment[] | An array of output variable assignments that are set at the end of the referenced flow. |
FlowSubflowInputAssignment
Assigns an element or value from the master flow to a variable in the referenced flow. Input assignments occur when the subflow calls the referenced flow. It extends FlowBaseElement and inherits all its fields. It is available in API version 25.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| name | string | Required. Unique name for the variable in the referenced flow. |
| value | FlowElementReferenceOrValue | Defines the value to assign to the variable. |
FlowSubflowOutputAssignment
Assigns the value of a variable from the referenced flow to a variable in the master flow. Output assignments occur when the referenced flow is finished running. It extends FlowBaseElement and inherits all its fields. It is available in API version 25.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| assignToReference | string | Required. Unique name for the variable in the master flow. |
| name | string | Required. Unique name for the variable in the referenced flow. |
FlowTextTemplate
Defines a text template that can be used throughout the flow. It extends FlowElement and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| text | string | Actual text of the template. Supports merge fields. |
FlowVariable
Variables allow you to create updatable values to use in the flow. FlowVariable extends FlowElement and inherits all its fields.
| Field Name | Field Type | Description |
|---|---|---|
| apexClass | string | The Apex class of this variable if its data type is Apex. Available in API version 46.0 and later. |
| dataType | FlowDataType (enumeration of type string) | Required. Valid types are:
|
| isCollection | boolean |
Indicates whether the variable
is a collection of values. This field is available in API
version 30.0 and later. In API version 32.0 and later, a collection
variable can be of any data type. Default value is False. |
| isInput | boolean | Indicates whether the variable can be set at the start of the flow using URL parameters, Visualforce controllers, or subflow inputs. This field is available in API version 25.0 and later. |
| isOutput | boolean | Indicates whether the variable’s value can be accessed from Visualforce controllers and other flows. This field is available in API version 25.0 and later. |
| objectType | string | Object type of this variable if its data type is sObject. |
| scale | int | Scale of this variable if its data type is Number or Currency. |
| value | FlowElementReferenceOrValue | Default value of this variable. Default values aren’t supported if the variable’s data type is Picklist or Multipicklist. |
FlowVisibilityRule
Visibility rules render a flow screen component when visibility rule conditions are met. Hides a flow screen component when visibility rule conditions aren’t met. Available in API version 47.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| conditionLogic | string | Specifies logic for the conditions. Value can be :
|
| conditions | FlowCondition[] | An array of conditions that must be true for the flow to wait for this event. |
FlowWait
Waits for one or more defined events to occur. FlowWait extends FlowNode and inherits all its fields. FlowWait is available in API version 32.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| defaultConnector | FlowConnector | Specifies which node to execute if the conditions are false for every event in the Wait element. |
| defaultConnectorLabel | string | Label for the default connector. |
| faultConnector | FlowConnector | Specifies which node to execute if the attempt to wait results in an error. If any of the wait events fail, the flow takes the fault connector. |
| waitEvents | FlowWaitEvent[] | An array of events that the Wait element is waiting for. If the conditions for every event evaluate to false, the defaultConnector is used. |
FlowWaitEvent
An event that a FlowWait element is waiting for. FlowWaitEvent extends FlowElement and inherits all its fields. FlowWaitEvent is available in API version 32.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| conditionLogic | string | Specifies logic for the conditions. Value can be:
|
| conditions | FlowCondition[] | An array of conditions that must be true for the flow to wait for this event. |
| connector | FlowConnector | Specifies which node to execute if this is the first event that occurs. |
| eventType | string | Required. The event’s type. The type determines which input
parameters are available to define this event. Valid values are:
|
| inputParameters | FlowWaitEventInputParameter[] | An array of the event’s input parameters. The parameter values are set by using values from the flow. |
| label | string | Required. Label for the wait event. |
| outputParameters | FlowWaitEventOutputParameter[] | An array of the event’s output parameters. The parameter values are assigned from the event to variables in the flow. |
FlowWaitEventInputParameter
An input parameter for FlowWaitEvent. The parameter’s value is set by using values from the flow. It extends FlowBaseElement and inherits all its fields. FlowWaitEventInputParameter is available in API version 32.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| name | string | Required. Unique name for the input parameter. |
| value | FlowElementReferenceOrValue | Defines the value of the input parameter. |
FlowWaitEventOutputParameter
An output parameter for FlowWaitEvent. The parameter’s value is assigned to a variable in the flow so that it can be referenced in another part of the flow. It extends FlowBaseElement and inherits all its fields. FlowWaitEventOutputParameter is available in API version 32.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| assignToReference | string | Required. Specifies the variable to which you want to assign the output parameter value. |
| name | string | Required. Unique name for the output parameter. |
Upgrade Flow Files to API Version 44.0 or Later
- The flows directory doesn’t include any unused flow versions.
- For each active flow, the status field is Active. Any flow without a status value is deployed or retrieved with a status value of Draft.
- The flowDefinitions directory is empty.
- The package.xml file is set to API version 44.0.
- For the latest version of each flow, the file name doesn't include a version number. For example, change myflow-3.flow to myflow.flow.
- The sfdx-project.json file is set to "sourceApiVersion": "44.0".
- For the latest version of each flow, the file name doesn't include a version number. For example, change myflow-1.flow-meta.xml to myflow.flow-meta.xml.
As part of this upgrade, flow definitions are no longer necessary when you deploy or retrieve via Metadata API. 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.
After you finished this upgrade, you can integrate with a version control system without worrying about flow file names changing. To reduce deployment issues when you push the source code into a scratch org, make sure you don’t reuse an existing scratch org.
Declarative Metadata Sample Definition
A sample XML definition of a flow is shown below.
1<?xml version="1.0" encoding="UTF-8"?>
2<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
3 <actionCalls>
4 <name>Post_to_Contact_s_Feed</name>
5 <label>Post to Contact's Feed</label>
6 <locationX>269</locationX>
7 <locationY>396</locationY>
8 <actionName>chatterPost</actionName>
9 <actionType>chatterPost</actionType>
10 <connector>
11 <targetReference>Confirm</targetReference>
12 </connector>
13 <inputParameters>
14 <name>text</name>
15 <value>
16 <elementReference>chatterMessage</elementReference>
17 </value>
18 </inputParameters>
19 <inputParameters>
20 <name>subjectNameOrId</name>
21 <value>
22 <elementReference>contact.Id</elementReference>
23 </value>
24 </inputParameters>
25 </actionCalls>
26 <assignments>
27 <name>Set_Contact_ID</name>
28 <label>Set Contact ID</label>
29 <locationX>568</locationX>
30 <locationY>396</locationY>
31 <assignmentItems>
32 <assignToReference>contact.Id</assignToReference>
33 <operator>Assign</operator>
34 <value>
35 <elementReference>existingId</elementReference>
36 </value>
37 </assignmentItems>
38 <connector>
39 <targetReference>Update_Contact</targetReference>
40 </connector>
41 </assignments>
42 <decisions>
43 <name>Update_If_Existing</name>
44 <label>Update If Existing?</label>
45 <locationX>260</locationX>
46 <locationY>52</locationY>
47 <defaultConnector>
48 <targetReference>Create_Contact</targetReference>
49 </defaultConnector>
50 <defaultConnectorLabel>No</defaultConnectorLabel>
51 <rules>
52 <name>Update_Yes</name>
53 <conditionLogic>and</conditionLogic>
54 <conditions>
55 <leftValueReference>updateExisting</leftValueReference>
56 <operator>EqualTo</operator>
57 <rightValue>
58 <booleanValue>true</booleanValue>
59 </rightValue>
60 </conditions>
61 <connector>
62 <targetReference>Find_a_Match</targetReference>
63 </connector>
64 <label>Yes</label>
65 </rules>
66 </decisions>
67 <decisions>
68 <name>Update_or_Create</name>
69 <label>Update or Create?</label>
70 <locationX>447</locationX>
71 <locationY>239</locationY>
72 <defaultConnector>
73 <targetReference>Create_Contact</targetReference>
74 </defaultConnector>
75 <defaultConnectorLabel>Create New</defaultConnectorLabel>
76 <rules>
77 <name>Update_Existing</name>
78 <conditionLogic>and</conditionLogic>
79 <conditions>
80 <leftValueReference>existingId</leftValueReference>
81 <operator>IsNull</operator>
82 <rightValue>
83 <booleanValue>false</booleanValue>
84 </rightValue>
85 </conditions>
86 <connector>
87 <targetReference>Set_Contact_ID</targetReference>
88 </connector>
89 <label>Update Existing</label>
90 </rules>
91 </decisions>
92 <dynamicChoiceSets>
93 <name>accounts</name>
94 <dataType>String</dataType>
95 <displayField>Name</displayField>
96 <object>Account</object>
97 <outputAssignments>
98 <assignToReference>contact.AccountId</assignToReference>
99 <field>Id</field>
100 </outputAssignments>
101 <valueField>Id</valueField>
102 </dynamicChoiceSets>
103 <formulas>
104 <name>created_or_updated</name>
105 <dataType>String</dataType>
106 <expression>IF({!Create_Contact}, "created", "updated")</expression>
107 </formulas>
108 <interviewLabel>New Contact {!$Flow.CurrentDateTime}</interviewLabel>
109 <isAdditionalPermissionRequiredToRun>true</isAdditionalPermissionRequiredToRun>
110 <isTemplate>true</isTemplate>
111 <label>New Contact</label>
112 <processMetadataValues>
113 <name>BuilderType</name>
114 <value>
115 <stringValue>LightningFlowBuilder</stringValue>
116 </value>
117 </processMetadataValues>
118 <processMetadataValues>
119 <name>OriginBuilderType</name>
120 <value>
121 <stringValue>LightningFlowBuilder</stringValue>
122 </value>
123 </processMetadataValues>
124 <processType>Flow</processType>
125 <recordCreates>
126 <name>Create_Contact</name>
127 <label>Create Contact</label>
128 <locationX>269</locationX>
129 <locationY>241</locationY>
130 <connector>
131 <targetReference>Post_to_Contact_s_Feed</targetReference>
132 </connector>
133 <inputReference>contact</inputReference>
134 </recordCreates>
135 <recordLookups>
136 <name>Find_a_Match</name>
137 <label>Find a Match</label>
138 <locationX>456</locationX>
139 <locationY>53</locationY>
140 <assignNullValuesIfNoRecordsFound>true</assignNullValuesIfNoRecordsFound>
141 <connector>
142 <targetReference>Update_or_Create</targetReference>
143 </connector>
144 <filters>
145 <field>FirstName</field>
146 <operator>EqualTo</operator>
147 <value>
148 <elementReference>contact.FirstName</elementReference>
149 </value>
150 </filters>
151 <filters>
152 <field>LastName</field>
153 <operator>EqualTo</operator>
154 <value>
155 <elementReference>contact.LastName</elementReference>
156 </value>
157 </filters>
158 <object>Contact</object>
159 <outputAssignments>
160 <assignToReference>existingId</assignToReference>
161 <field>Id</field>
162 </outputAssignments>
163 </recordLookups>
164 <recordUpdates>
165 <name>Update_Contact</name>
166 <label>Update Contact</label>
167 <locationX>456</locationX>
168 <locationY>396</locationY>
169 <connector>
170 <targetReference>Post_to_Contact_s_Feed</targetReference>
171 </connector>
172 <inputReference>contact</inputReference>
173 </recordUpdates>
174 <screens>
175 <name>Confirm</name>
176 <label>Confirm</label>
177 <locationX>270</locationX>
178 <locationY>519</locationY>
179 <allowBack>false</allowBack>
180 <allowFinish>true</allowFinish>
181 <allowPause>true</allowPause>
182 <fields>
183 <name>confirmation_message</name>
184 <fieldText>Thanks! <a href="/{!contact.Id}">The contact</a> was {!created_or_updated}.</fieldText>
185 <fieldType>DisplayText</fieldType>
186 </fields>
187 <showFooter>true</showFooter>
188 <showHeader>true</showHeader>
189 </screens>
190 <screens>
191 <name>Contact_Info</name>
192 <label>Contact Info</label>
193 <locationX>160</locationX>
194 <locationY>50</locationY>
195 <allowBack>true</allowBack>
196 <allowFinish>true</allowFinish>
197 <allowPause>true</allowPause>
198 <connector>
199 <targetReference>Update_If_Existing</targetReference>
200 </connector>
201 <fields>
202 <name>contactName</name>
203 <extensionName>flowruntime:name</extensionName>
204 <fieldType>ComponentInstance</fieldType>
205 <isRequired>true</isRequired>
206 <outputParameters>
207 <assignToReference>contact.FirstName</assignToReference>
208 <name>firstName</name>
209 </outputParameters>
210 <outputParameters>
211 <assignToReference>contact.LastName</assignToReference>
212 <name>lastName</name>
213 </outputParameters>
214 </fields>
215 <fields>
216 <name>Account</name>
217 <choiceReferences>accounts</choiceReferences>
218 <dataType>String</dataType>
219 <fieldText>Account</fieldText>
220 <fieldType>DropdownBox</fieldType>
221 <isRequired>true</isRequired>
222 </fields>
223 <fields>
224 <name>update_toggle</name>
225 <extensionName>flowruntime:toggle</extensionName>
226 <fieldType>ComponentInstance</fieldType>
227 <inputParameters>
228 <name>label</name>
229 <value>
230 <stringValue>If this contact already exists, update the existing record.</stringValue>
231 </value>
232 </inputParameters>
233 <inputParameters>
234 <name>messageToggleActive</name>
235 <value>
236 <stringValue>Update existing</stringValue>
237 </value>
238 </inputParameters>
239 <inputParameters>
240 <name>messageToggleInactive</name>
241 <value>
242 <stringValue>Create other contact</stringValue>
243 </value>
244 </inputParameters>
245 <isRequired>true</isRequired>
246 <outputParameters>
247 <assignToReference>updateExisting</assignToReference>
248 <name>value</name>
249 </outputParameters>
250 </fields>
251 <showFooter>true</showFooter>
252 <showHeader>true</showHeader>
253 </screens>
254 <start>
255 <locationX>50</locationX>
256 <locationY>50</locationY>
257 <connector>
258 <targetReference>Contact_Info</targetReference>
259 </connector>
260 </start>
261 <status>Draft</status>
262 <textTemplates>
263 <name>chatterMessage</name>
264 <text>The contact was {!created_or_updated}.</text>
265 </textTemplates>
266 <variables>
267 <name>contact</name>
268 <dataType>SObject</dataType>
269 <isCollection>false</isCollection>
270 <isInput>false</isInput>
271 <isOutput>false</isOutput>
272 <objectType>Contact</objectType>
273 </variables>
274 <variables>
275 <name>existingId</name>
276 <dataType>String</dataType>
277 <isCollection>false</isCollection>
278 <isInput>false</isInput>
279 <isOutput>false</isOutput>
280 </variables>
281 <variables>
282 <name>updateExisting</name>
283 <dataType>Boolean</dataType>
284 <isCollection>false</isCollection>
285 <isInput>false</isInput>
286 <isOutput>false</isOutput>
287 </variables>
288</Flow>Wildcard Support in the Manifest File
This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.
) for the screen component.