Get Ready to Develop with Field Service
API End-of-Life Policy
Field Service Flow
Field Service Mobile Settings
Service Report Template
Field Service Tooling API
Field Service Custom Triggers
Previous Versions
Returns information corresponding to a field service flow. This resource is available in REST API version 42.0 and later.
This resource accepts the API name of a flow definition and returns information about the active flow version. If no flow version is activated, the most recent version is returned. Flow elements can be translated to the language of the user invoking this API by using Translation Workbench. If a particular flow version’s elements have been translated, the data returned uses the language of the query. To learn more, see Flow Components in Translation Workbench.
This resource is available to API users with Field Service mobile app user permissions and the Run Flows user permission.
URI: /services/data/vXX.X/support/fieldservice/Flow?developerNames=FLOW_UNIQUE_NAME
Where FLOW_UNIQUE_NAME is a variable.
Formats: JSON, XML
HTTP Method: GET
Authentication: Authorization: Bearer TOKEN
Where TOKEN is a variable.
Parameters:
| Parameter | Description |
|---|---|
developerNames | The unique name for the flow definition. Currently, you can specify only one unique name using this parameter. |
The following table describes the main elements of the response body.
| Field | Type | Description |
|---|---|---|
Flows | Array | List of flows. |
CreatedDate | String | Date the flow was created. |
Description | String | Description of the flow. |
FullName | String | Full name for the flow. |
Id | String | Unique ID for the flow. |
LastModifiedDate | String | Date the flow was last modified. |
Metadata | Flow metadata. | |
Choices | Array | List of choices used by fields. |
ChoiceText | String | Text of choice. |
DataType | String | Data type of choice. |
Name | String | Name for the choice. |
Screens | Array of objects | List of screens for the flow. |
AllowBack | Boolean | Whether you can go back from the screen. |
AllowFinish | Boolean | Whether you can finish the flow from the screen. |
AllowPause | Boolean | Whether you can pause from the screen. |
Fields | Array of objects | List of fields used by the screen. |
HelpText | String | Help text for the screen. |
Label | String | Label for the screen. |
LocationX | Number | X coordinate for the screen. |
LocationY | Number | Y coordinate for the screen. |
Name | String | Name of the screen. |
ProcessType | String | Type of process for the flow; in this case, it should be “FieldServiceMobile”. |
Status | String | Status of the flow. |
VersionNumber | Number | Version number for the flow. |
This sample request uses the unique name “FS_Flow” for the flow definition.
The response contains two screens.
Screen 1 contains two fields:
Screen 2 contains one field:
Request:
GET
/services/data/v42.0/support/fieldservice/Flow?developerNames=FS_Flow
Response:
1{
2 "flows" : [ {
3 "Id" : "301R000000008grIAA",
4 "DefinitionId" : "300R00000004OLFIA2",
5 "MasterLabel" : "FS_Flow",
6 "ManageableState" : "unmanaged",
7 "VersionNumber" : 1,
8 "Status" : "Draft",
9 "Description" : "FS Flow",
10 "ProcessType" : "FieldServiceMobile",
11 "CreatedDate" : "2017-12-05T19:22:16.000+0000",
12 "CreatedById" : "005R0000000J2glIAC",
13 "LastModifiedDate" : "2017-12-05T19:22:16.000+0000",
14 "LastModifiedById" : "005R0000000J2glIAC",
15 "Metadata" : {
16 "actionCalls" : null,
17 "apexPluginCalls" : null,
18 "assignments" : null,
19 "choices" : [ {
20 "choiceText" : "Choice A",
21 "dataType" : "String",
22 "description" : null,
23 "name" : "Choice_A",
24 "processMetadataValues" : null,
25 "userInput" : null,
26 "value" : null
27 }, {
28 "choiceText" : "Choice B",
29 "dataType" : "String",
30 "description" : null,
31 "name" : "Choice_B",
32 "processMetadataValues" : null,
33 "userInput" : null,
34 "value" : null
35 } ],
36 "constants" : null,
37 "decisions" : null,
38 "description" : "FS Flow",
39 "dynamicChoiceSets" : null,
40 "formulas" : null,
41 "fullName" : "FS_Flow-1",
42 "interviewLabel" : "FS_Flow {!$Flow.CurrentDateTime}",
43 "label" : "FS Flow",
44 "loops" : null,
45 "module" : null,
46 "processMetadataValues" : null,
47 "processType" : "FieldServiceMobile",
48 "recordCreates" : null,
49 "recordDeletes" : null,
50 "recordLookups" : null,
51 "recordUpdates" : null,
52 "screens" : [ {
53 "allowBack" : true,
54 "allowFinish" : true,
55 "allowPause" : true,
56 "connector" : {
57 "processMetadataValues" : null,
58 "targetReference" : "Screen_2"
59 },
60 "description" : null,
61 "fields" : [ {
62 "choiceReferences" : null,
63 "dataType" : "String",
64 "defaultSelectedChoiceReference" : null,
65 "defaultValue" : null,
66 "description" : null,
67 "extensionName" : null,
68 "fieldText" : "Field 1",
69 "fieldType" : "InputField",
70 "helpText" : "Help Text 1",
71 "inputParameters" : [ ],
72 "isRequired" : false,
73 "isVisible" : null,
74 "name" : "Field_1",
75 "outputParameters" : [ ],
76 "processMetadataValues" : null,
77 "scale" : null,
78 "validationRule" : null
79 }, {
80 "choiceReferences" : [ "Choice_A", "Choice_B" ],
81 "dataType" : "String",
82 "defaultSelectedChoiceReference" : null,
83 "defaultValue" : null,
84 "description" : null,
85 "extensionName" : null,
86 "fieldText" : "Pick a choice",
87 "fieldType" : "RadioButtons",
88 "helpText" : "Pick a Choice help text",
89 "inputParameters" : [ ],
90 "isRequired" : false,
91 "isVisible" : null,
92 "name" : "Pick_a_choice",
93 "outputParameters" : [ ],
94 "processMetadataValues" : null,
95 "scale" : null,
96 "validationRule" : null
97 } ],
98 "helpText" : null,
99 "label" : "Screen 1",
100 "locationX" : 189,
101 "locationY" : 178,
102 "name" : "Screen_1",
103 "pausedText" : null,
104 "processMetadataValues" : null,
105 "rules" : null,
106 "showFooter" : true,
107 "showHeader" : true
108 }, {
109 "allowBack" : true,
110 "allowFinish" : true,
111 "allowPause" : true,
112 "connector" : null,
113 "description" : null,
114 "fields" : [ {
115 "choiceReferences" : null,
116 "dataType" : "String",
117 "defaultSelectedChoiceReference" : null,
118 "defaultValue" : null,
119 "description" : null,
120 "extensionName" : null,
121 "fieldText" : "Field 1",
122 "fieldType" : "InputField",
123 "helpText" : null,
124 "inputParameters" : [ ],
125 "isRequired" : false,
126 "isVisible" : null,
127 "name" : "Field_1",
128 "outputParameters" : [ ],
129 "processMetadataValues" : null,
130 "scale" : null,
131 "validationRule" : null
132 } ],
133 "helpText" : null,
134 "label" : "Screen 2",
135 "locationX" : 437,
136 "locationY" : 289,
137 "name" : "Screen_2",
138 "pausedText" : null,
139 "processMetadataValues" : null,
140 "rules" : null,
141 "showFooter" : true,
142 "showHeader" : true
143 } ],
144 "startElementReference" : "Screen_1",
145 "steps" : null,
146 "subflows" : null,
147 "textTemplates" : null,
148 "urls" : null,
149 "variables" : null,
150 "waits" : null
151 },
152 "FullName" : "FS_Flow-1"
153 } ]
154}