FlowDefinitionUpsert

Use this node to create or update a Salesforce flow definition.

Asset Type Name for Rules 

flowdefinition

Example Definition in chain.json 

1{
2  "name": "create_flow",
3  "label": "Creates a Flow Definition",
4  "dominoVariant": "sfdc_internal__UnifiedAnalyticsDominoVariant",
5  "parameters": {},
6  "definition": {
7    "nodes": {
8      "upsert_flow": {
9        "graphNodeType": {
10          "name": "FlowDefinitionUpsert"
11        },
12        "parameters": {
13          "name": "createContentFlow",
14          "label": "Create Content Flow",
15          "file": "flows/create_content_flow.xml",
16          "devName": "createContentFlow"
17        },
18        "sources": [],
19        "runAs": "CurrentUser"
20      }
21    }
22  }
23}

Parameters 

ParameterDefinition
name(Required) The template asset name for the flow.
label(Optional) The label for the flow.
file(Required) The path to the XML file that contains the flow definition.
devName(Required) The developer name for the flow.
condition(Optional) An EL expression, evaluated at runtime, that determines whether to upload this CSV or not.

Set runAs to CurrentUser so that this node runs with the permissions of the user installing the app. If you omit runAs, the node runs as AutoProc, a system user.

Note

App Context Values 

Flows created from a template get an entry in the App Context if they are successful. These entries are keyed off of the template specific asset name and contain information about the instance that was created.

App Context ValueDefinition
App.FlowDefinitions.<template specific asset name>.IdThe ID of the created flow.
App.FlowDefinitions.<template specific asset name>.NameThe developer name of the created flow.
App.FlowDefinitions.<template specific asset name>.LabelThe label of the created flow.

On Failure 

If this task fails, it returns a FAIL_TERMINAL status. The chain stops and no downstream nodes run.

See Also