Skip to content

Commit 5b9b72f

Browse files
authored
Merge pull request #28 from SFDO-Community/feature-base-flows
#118 Feature Two Screen Flow and One List View Button independent fro…
2 parents cc80f10 + 5c1b110 commit 5b9b72f

File tree

5 files changed

+629
-0
lines changed

5 files changed

+629
-0
lines changed

cumulusci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ tasks:
3333
class_path: cumulusci.tasks.salesforce.Deploy
3434
options:
3535
path: unpackaged/config/sample_surveys
36+
deploy_base_flows:
37+
description: GRMS - Base Flows
38+
group: Salesforce Metadata
39+
class_path: cumulusci.tasks.salesforce.Deploy
40+
options:
41+
path: unpackaged-base-flows/config/base-samples
3642

3743
flows:
3844
config_apextest:
@@ -51,6 +57,10 @@ flows:
5157
task: deploy_sample_surveys
5258
ui_options:
5359
is_required: False
60+
3:
61+
task: deploy_base_flows
62+
ui_options:
63+
is_required: False
5464

5565
plans:
5666
install:

sfdx-project.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
},
1010
{
1111
"path": "unpackaged/config/sample_surveys"
12+
},
13+
{
14+
"path": "unpackaged-base-flows/config/base-samples"
1215
}
1316
],
1417
"namespace": "",
Lines changed: 341 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,341 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
3+
<apiVersion>57.0</apiVersion>
4+
<assignments>
5+
<name>Clone_Relationships_To_Update</name>
6+
<label>Clone Relationships To Update</label>
7+
<locationX>490</locationX>
8+
<locationY>674</locationY>
9+
<assignmentItems>
10+
<assignToReference>RelationshipsToCopy</assignToReference>
11+
<operator>Add</operator>
12+
<value>
13+
<elementReference>NewRelationship</elementReference>
14+
</value>
15+
</assignmentItems>
16+
<connector>
17+
<targetReference>Create_New_Relationships</targetReference>
18+
</connector>
19+
</assignments>
20+
<assignments>
21+
<name>Create_Relationship</name>
22+
<label>Create Relationship</label>
23+
<locationX>490</locationX>
24+
<locationY>566</locationY>
25+
<assignmentItems>
26+
<assignToReference>NewRelationship.GRMS__Client__c</assignToReference>
27+
<operator>Assign</operator>
28+
<value>
29+
<elementReference>Create_New_Relationships.GRMS__Client__r.Id</elementReference>
30+
</value>
31+
</assignmentItems>
32+
<assignmentItems>
33+
<assignToReference>NewRelationship.GRMS__FieldWorker__c</assignToReference>
34+
<operator>Assign</operator>
35+
<value>
36+
<elementReference>Which_field_worker_do_you_want_to_move_the_case_load_to</elementReference>
37+
</value>
38+
</assignmentItems>
39+
<assignmentItems>
40+
<assignToReference>NewRelationship.GRMS__Type__c</assignToReference>
41+
<operator>Assign</operator>
42+
<value>
43+
<elementReference>Create_New_Relationships.GRMS__Type__c</elementReference>
44+
</value>
45+
</assignmentItems>
46+
<connector>
47+
<targetReference>Clone_Relationships_To_Update</targetReference>
48+
</connector>
49+
</assignments>
50+
<assignments>
51+
<name>Relationships_To_Update</name>
52+
<label>Relationships To Update</label>
53+
<locationX>138</locationX>
54+
<locationY>674</locationY>
55+
<assignmentItems>
56+
<assignToReference>RelationshipsToUpdate</assignToReference>
57+
<operator>Add</operator>
58+
<value>
59+
<elementReference>Re_assign_Relationships</elementReference>
60+
</value>
61+
</assignmentItems>
62+
<connector>
63+
<targetReference>Re_assign_Relationships</targetReference>
64+
</connector>
65+
</assignments>
66+
<assignments>
67+
<description>Update the Field Worker Id to the new Field Worker selected in the selection screen</description>
68+
<name>Update_Field_Worker_Id</name>
69+
<label>Update Field Worker Id</label>
70+
<locationX>138</locationX>
71+
<locationY>566</locationY>
72+
<assignmentItems>
73+
<assignToReference>Re_assign_Relationships.GRMS__FieldWorker__c</assignToReference>
74+
<operator>Assign</operator>
75+
<value>
76+
<elementReference>Which_field_worker_do_you_want_to_move_the_case_load_to</elementReference>
77+
</value>
78+
</assignmentItems>
79+
<connector>
80+
<targetReference>Relationships_To_Update</targetReference>
81+
</connector>
82+
</assignments>
83+
<choices>
84+
<name>Copy</name>
85+
<choiceText>Copy</choiceText>
86+
<dataType>String</dataType>
87+
<value>
88+
<stringValue>Copy</stringValue>
89+
</value>
90+
</choices>
91+
<choices>
92+
<name>Migrate</name>
93+
<choiceText>Migrate</choiceText>
94+
<dataType>String</dataType>
95+
<value>
96+
<stringValue>Migrate</stringValue>
97+
</value>
98+
</choices>
99+
<decisions>
100+
<name>Migrate_or_Copy_Decision</name>
101+
<label>Migrate or Copy Decision</label>
102+
<locationX>226</locationX>
103+
<locationY>350</locationY>
104+
<defaultConnector>
105+
<targetReference>Create_New_Relationships</targetReference>
106+
</defaultConnector>
107+
<defaultConnectorLabel>Copy</defaultConnectorLabel>
108+
<rules>
109+
<name>MigrateOutcome</name>
110+
<conditionLogic>and</conditionLogic>
111+
<conditions>
112+
<leftValueReference>typedecision</leftValueReference>
113+
<operator>EqualTo</operator>
114+
<rightValue>
115+
<elementReference>Migrate</elementReference>
116+
</rightValue>
117+
</conditions>
118+
<connector>
119+
<targetReference>Re_assign_Relationships</targetReference>
120+
</connector>
121+
<label>MigrateOutcome</label>
122+
</rules>
123+
</decisions>
124+
<description>A screen flow to migrate a case load between fields workers, either by re-assigning to a different field worker or by copy a case load to a different field worker.</description>
125+
<dynamicChoiceSets>
126+
<name>Field_Worker_End</name>
127+
<dataType>String</dataType>
128+
<displayField>Name</displayField>
129+
<filterLogic>and</filterLogic>
130+
<filters>
131+
<field>GRMS__ContactType__c</field>
132+
<operator>EqualTo</operator>
133+
<value>
134+
<stringValue>Field Worker</stringValue>
135+
</value>
136+
</filters>
137+
<object>Contact</object>
138+
<sortField>Name</sortField>
139+
<sortOrder>Asc</sortOrder>
140+
<valueField>Id</valueField>
141+
</dynamicChoiceSets>
142+
<dynamicChoiceSets>
143+
<name>Field_Workers_Start</name>
144+
<dataType>String</dataType>
145+
<displayField>Name</displayField>
146+
<filterLogic>and</filterLogic>
147+
<filters>
148+
<field>GRMS__ContactType__c</field>
149+
<operator>EqualTo</operator>
150+
<value>
151+
<stringValue>Field Worker</stringValue>
152+
</value>
153+
</filters>
154+
<object>Contact</object>
155+
<sortField>Name</sortField>
156+
<sortOrder>Asc</sortOrder>
157+
<valueField>Id</valueField>
158+
</dynamicChoiceSets>
159+
<interviewLabel>Case Load Migration Flow {!$Flow.CurrentDateTime}</interviewLabel>
160+
<label>Case Load Migration Flow</label>
161+
<loops>
162+
<name>Create_New_Relationships</name>
163+
<label>Create New Relationships</label>
164+
<locationX>402</locationX>
165+
<locationY>458</locationY>
166+
<collectionReference>Get_Case_Load</collectionReference>
167+
<iterationOrder>Asc</iterationOrder>
168+
<nextValueConnector>
169+
<targetReference>Create_Relationship</targetReference>
170+
</nextValueConnector>
171+
<noMoreValuesConnector>
172+
<targetReference>Create_Relationships</targetReference>
173+
</noMoreValuesConnector>
174+
</loops>
175+
<loops>
176+
<description>Re-assign the field worker and client relationships to the new field worker.</description>
177+
<name>Re_assign_Relationships</name>
178+
<label>Re-assign Relationships</label>
179+
<locationX>50</locationX>
180+
<locationY>458</locationY>
181+
<collectionReference>Get_Case_Load</collectionReference>
182+
<iterationOrder>Asc</iterationOrder>
183+
<nextValueConnector>
184+
<targetReference>Update_Field_Worker_Id</targetReference>
185+
</nextValueConnector>
186+
<noMoreValuesConnector>
187+
<targetReference>Update_all_Relationships</targetReference>
188+
</noMoreValuesConnector>
189+
</loops>
190+
<processMetadataValues>
191+
<name>BuilderType</name>
192+
<value>
193+
<stringValue>LightningFlowBuilder</stringValue>
194+
</value>
195+
</processMetadataValues>
196+
<processMetadataValues>
197+
<name>CanvasMode</name>
198+
<value>
199+
<stringValue>AUTO_LAYOUT_CANVAS</stringValue>
200+
</value>
201+
</processMetadataValues>
202+
<processMetadataValues>
203+
<name>OriginBuilderType</name>
204+
<value>
205+
<stringValue>LightningFlowBuilder</stringValue>
206+
</value>
207+
</processMetadataValues>
208+
<processType>Flow</processType>
209+
<recordCreates>
210+
<name>Create_Relationships</name>
211+
<label>Create Relationships</label>
212+
<locationX>402</locationX>
213+
<locationY>866</locationY>
214+
<connector>
215+
<targetReference>Success</targetReference>
216+
</connector>
217+
<inputReference>RelationshipsToCopy</inputReference>
218+
</recordCreates>
219+
<recordLookups>
220+
<name>Get_Case_Load</name>
221+
<label>Get Case Load</label>
222+
<locationX>226</locationX>
223+
<locationY>242</locationY>
224+
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
225+
<connector>
226+
<targetReference>Migrate_or_Copy_Decision</targetReference>
227+
</connector>
228+
<filterLogic>and</filterLogic>
229+
<filters>
230+
<field>GRMS__FieldWorker__c</field>
231+
<operator>EqualTo</operator>
232+
<value>
233+
<elementReference>Which_field_worker_do_you_want_to_start_with</elementReference>
234+
</value>
235+
</filters>
236+
<getFirstRecordOnly>false</getFirstRecordOnly>
237+
<object>GRMS__FieldWorkerClientRelation__c</object>
238+
<storeOutputAutomatically>true</storeOutputAutomatically>
239+
</recordLookups>
240+
<recordUpdates>
241+
<name>Update_all_Relationships</name>
242+
<label>Update all Relationships</label>
243+
<locationX>50</locationX>
244+
<locationY>866</locationY>
245+
<connector>
246+
<targetReference>Success</targetReference>
247+
</connector>
248+
<inputReference>RelationshipsToUpdate</inputReference>
249+
</recordUpdates>
250+
<screens>
251+
<name>Selection_Screen</name>
252+
<label>Selection Screen</label>
253+
<locationX>226</locationX>
254+
<locationY>134</locationY>
255+
<allowBack>true</allowBack>
256+
<allowFinish>true</allowFinish>
257+
<allowPause>true</allowPause>
258+
<connector>
259+
<targetReference>Get_Case_Load</targetReference>
260+
</connector>
261+
<fields>
262+
<name>Which_field_worker_do_you_want_to_start_with</name>
263+
<choiceReferences>Field_Workers_Start</choiceReferences>
264+
<dataType>String</dataType>
265+
<fieldText>Which field worker do you want to start with?</fieldText>
266+
<fieldType>DropdownBox</fieldType>
267+
<isRequired>true</isRequired>
268+
</fields>
269+
<fields>
270+
<name>Which_field_worker_do_you_want_to_move_the_case_load_to</name>
271+
<choiceReferences>Field_Worker_End</choiceReferences>
272+
<dataType>String</dataType>
273+
<fieldText>Which field worker do you want to move the case load to?</fieldText>
274+
<fieldType>DropdownBox</fieldType>
275+
<isRequired>true</isRequired>
276+
</fields>
277+
<fields>
278+
<name>Decision1</name>
279+
<fieldText>&lt;p&gt;Do you want to migrate the caseload of surveys from one field worker to another (and delete the caseload from the first field worker) or do you want to copy a caseload from a case worker to another?&lt;/p&gt;</fieldText>
280+
<fieldType>DisplayText</fieldType>
281+
</fields>
282+
<fields>
283+
<name>typedecision</name>
284+
<choiceReferences>Migrate</choiceReferences>
285+
<choiceReferences>Copy</choiceReferences>
286+
<dataType>String</dataType>
287+
<fieldType>RadioButtons</fieldType>
288+
<isRequired>true</isRequired>
289+
</fields>
290+
<showFooter>true</showFooter>
291+
<showHeader>true</showHeader>
292+
</screens>
293+
<screens>
294+
<name>Success</name>
295+
<label>Success</label>
296+
<locationX>226</locationX>
297+
<locationY>1058</locationY>
298+
<allowBack>true</allowBack>
299+
<allowFinish>true</allowFinish>
300+
<allowPause>true</allowPause>
301+
<fields>
302+
<name>SuccessMessage</name>
303+
<fieldText>&lt;p&gt;Your relationships have updated&lt;/p&gt;</fieldText>
304+
<fieldType>DisplayText</fieldType>
305+
</fields>
306+
<showFooter>true</showFooter>
307+
<showHeader>true</showHeader>
308+
</screens>
309+
<start>
310+
<locationX>100</locationX>
311+
<locationY>0</locationY>
312+
<connector>
313+
<targetReference>Selection_Screen</targetReference>
314+
</connector>
315+
</start>
316+
<status>Active</status>
317+
<variables>
318+
<name>NewRelationship</name>
319+
<dataType>SObject</dataType>
320+
<isCollection>false</isCollection>
321+
<isInput>false</isInput>
322+
<isOutput>false</isOutput>
323+
<objectType>GRMS__FieldWorkerClientRelation__c</objectType>
324+
</variables>
325+
<variables>
326+
<name>RelationshipsToCopy</name>
327+
<dataType>SObject</dataType>
328+
<isCollection>true</isCollection>
329+
<isInput>false</isInput>
330+
<isOutput>false</isOutput>
331+
<objectType>GRMS__FieldWorkerClientRelation__c</objectType>
332+
</variables>
333+
<variables>
334+
<name>RelationshipsToUpdate</name>
335+
<dataType>SObject</dataType>
336+
<isCollection>true</isCollection>
337+
<isInput>false</isInput>
338+
<isOutput>false</isOutput>
339+
<objectType>GRMS__FieldWorkerClientRelation__c</objectType>
340+
</variables>
341+
</Flow>

0 commit comments

Comments
 (0)