diff --git a/cumulusci.yml b/cumulusci.yml
index cd6a06c..47947a2 100644
--- a/cumulusci.yml
+++ b/cumulusci.yml
@@ -33,6 +33,12 @@ tasks:
class_path: cumulusci.tasks.salesforce.Deploy
options:
path: unpackaged/config/sample_surveys
+ deploy_base_flows:
+ description: GRMS - Base Flows
+ group: Salesforce Metadata
+ class_path: cumulusci.tasks.salesforce.Deploy
+ options:
+ path: unpackaged-base-flows/config/base-samples
flows:
config_apextest:
@@ -51,6 +57,10 @@ flows:
task: deploy_sample_surveys
ui_options:
is_required: False
+ 3:
+ task: deploy_base_flows
+ ui_options:
+ is_required: False
plans:
install:
diff --git a/sfdx-project.json b/sfdx-project.json
index 011276e..8e2bc13 100644
--- a/sfdx-project.json
+++ b/sfdx-project.json
@@ -9,6 +9,9 @@
},
{
"path": "unpackaged/config/sample_surveys"
+ },
+ {
+ "path": "unpackaged-base-flows/config/base-samples"
}
],
"namespace": "",
diff --git a/unpackaged-base-flows/config/base-samples/flows/Case_Load_Migration_Flow.flow-meta.xml b/unpackaged-base-flows/config/base-samples/flows/Case_Load_Migration_Flow.flow-meta.xml
new file mode 100644
index 0000000..fac78dc
--- /dev/null
+++ b/unpackaged-base-flows/config/base-samples/flows/Case_Load_Migration_Flow.flow-meta.xml
@@ -0,0 +1,341 @@
+
+
+ 57.0
+
+ Clone_Relationships_To_Update
+
+ 490
+ 674
+
+ RelationshipsToCopy
+ Add
+
+ NewRelationship
+
+
+
+ Create_New_Relationships
+
+
+
+ Create_Relationship
+
+ 490
+ 566
+
+ NewRelationship.GRMS__Client__c
+ Assign
+
+ Create_New_Relationships.GRMS__Client__r.Id
+
+
+
+ NewRelationship.GRMS__FieldWorker__c
+ Assign
+
+ Which_field_worker_do_you_want_to_move_the_case_load_to
+
+
+
+ NewRelationship.GRMS__Type__c
+ Assign
+
+ Create_New_Relationships.GRMS__Type__c
+
+
+
+ Clone_Relationships_To_Update
+
+
+
+ Relationships_To_Update
+
+ 138
+ 674
+
+ RelationshipsToUpdate
+ Add
+
+ Re_assign_Relationships
+
+
+
+ Re_assign_Relationships
+
+
+
+ Update the Field Worker Id to the new Field Worker selected in the selection screen
+ Update_Field_Worker_Id
+
+ 138
+ 566
+
+ Re_assign_Relationships.GRMS__FieldWorker__c
+ Assign
+
+ Which_field_worker_do_you_want_to_move_the_case_load_to
+
+
+
+ Relationships_To_Update
+
+
+
+ Copy
+ Copy
+ String
+
+ Copy
+
+
+
+ Migrate
+ Migrate
+ String
+
+ Migrate
+
+
+
+ Migrate_or_Copy_Decision
+
+ 226
+ 350
+
+ Create_New_Relationships
+
+ Copy
+
+ MigrateOutcome
+ and
+
+ typedecision
+ EqualTo
+
+ Migrate
+
+
+
+ Re_assign_Relationships
+
+
+
+
+ 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.
+
+ Field_Worker_End
+ String
+ Name
+ and
+
+ GRMS__ContactType__c
+ EqualTo
+
+ Field Worker
+
+
+
+ Name
+ Asc
+ Id
+
+
+ Field_Workers_Start
+ String
+ Name
+ and
+
+ GRMS__ContactType__c
+ EqualTo
+
+ Field Worker
+
+
+
+ Name
+ Asc
+ Id
+
+ Case Load Migration Flow {!$Flow.CurrentDateTime}
+
+
+ Create_New_Relationships
+
+ 402
+ 458
+ Get_Case_Load
+ Asc
+
+ Create_Relationship
+
+
+ Create_Relationships
+
+
+
+ Re-assign the field worker and client relationships to the new field worker.
+ Re_assign_Relationships
+
+ 50
+ 458
+ Get_Case_Load
+ Asc
+
+ Update_Field_Worker_Id
+
+
+ Update_all_Relationships
+
+
+
+ BuilderType
+
+ LightningFlowBuilder
+
+
+
+ CanvasMode
+
+ AUTO_LAYOUT_CANVAS
+
+
+
+ OriginBuilderType
+
+ LightningFlowBuilder
+
+
+ Flow
+
+ Create_Relationships
+
+ 402
+ 866
+
+ Success
+
+ RelationshipsToCopy
+
+
+ Get_Case_Load
+
+ 226
+ 242
+ false
+
+ Migrate_or_Copy_Decision
+
+ and
+
+ GRMS__FieldWorker__c
+ EqualTo
+
+ Which_field_worker_do_you_want_to_start_with
+
+
+ false
+
+ true
+
+
+ Update_all_Relationships
+
+ 50
+ 866
+
+ Success
+
+ RelationshipsToUpdate
+
+
+ Selection_Screen
+
+ 226
+ 134
+ true
+ true
+ true
+
+ Get_Case_Load
+
+
+ Which_field_worker_do_you_want_to_start_with
+ Field_Workers_Start
+ String
+ Which field worker do you want to start with?
+ DropdownBox
+ true
+
+
+ Which_field_worker_do_you_want_to_move_the_case_load_to
+ Field_Worker_End
+ String
+ Which field worker do you want to move the case load to?
+ DropdownBox
+ true
+
+
+ Decision1
+ <p>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?</p>
+ DisplayText
+
+
+ typedecision
+ Migrate
+ Copy
+ String
+ RadioButtons
+ true
+
+ true
+ true
+
+
+ Success
+
+ 226
+ 1058
+ true
+ true
+ true
+
+ SuccessMessage
+ <p>Your relationships have updated</p>
+ DisplayText
+
+ true
+ true
+
+
+ 100
+ 0
+
+ Selection_Screen
+
+
+ Active
+
+ NewRelationship
+ SObject
+ false
+ false
+ false
+ GRMS__FieldWorkerClientRelation__c
+
+
+ RelationshipsToCopy
+ SObject
+ true
+ false
+ false
+ GRMS__FieldWorkerClientRelation__c
+
+
+ RelationshipsToUpdate
+ SObject
+ true
+ false
+ false
+ GRMS__FieldWorkerClientRelation__c
+
+
diff --git a/unpackaged-base-flows/config/base-samples/flows/Create_Relationships_from_List_View.flow-meta.xml b/unpackaged-base-flows/config/base-samples/flows/Create_Relationships_from_List_View.flow-meta.xml
new file mode 100644
index 0000000..c799b79
--- /dev/null
+++ b/unpackaged-base-flows/config/base-samples/flows/Create_Relationships_from_List_View.flow-meta.xml
@@ -0,0 +1,261 @@
+
+
+ 57.0
+
+ Add_Client_to_Collection
+
+ 440
+ 758
+
+ relToCreate
+ Add
+
+ relSingle
+
+
+
+ Retrieved_Contacts
+
+
+
+ Assign_Client
+
+ 440
+ 638
+
+ relSingle.GRMS__Client__c
+ Assign
+
+ Retrieved_Contacts.Id
+
+
+
+ relSingle.GRMS__FieldWorker__c
+ Assign
+
+ fieldWorker.Id
+
+
+
+ relSingle.GRMS__Type__c
+ Assign
+
+ Choose_the_relationship_type
+
+
+
+ Add_Client_to_Collection
+
+
+
+ Survey_Client
+
+ 352
+ 518
+
+ Assign_Client
+
+ Survey Client
+
+ Contact_Type_is_NOT_Survey_Client
+ and
+
+ Retrieved_Contacts.GRMS__ContactType__c
+ NotEqualTo
+
+ Survey Client
+
+
+
+ Retrieved_Contacts
+
+
+
+
+
+ fieldWorkerChoiceSet
+ String
+ GRMS__LoginEmail__c
+ and
+
+ GRMS__ContactType__c
+ EqualTo
+
+ Field Worker
+
+
+
+
+ fieldWorker.Id
+ Id
+
+ Id
+
+
+ RelationshipTypes
+ Picklist
+
+
+ GRMS__Type__c
+ GRMS__FieldWorkerClientRelation__c
+
+ Create Relationships from List View {!$Flow.CurrentDateTime}
+
+
+ Retrieved_Contacts
+
+ 176
+ 398
+ Retrieve_Contacts
+ Asc
+
+ Survey_Client
+
+
+ Create_Relationships
+
+
+
+ BuilderType
+
+ LightningFlowBuilder
+
+
+
+ CanvasMode
+
+ AUTO_LAYOUT_CANVAS
+
+
+
+ OriginBuilderType
+
+ LightningFlowBuilder
+
+
+ Flow
+
+ Create_Relationships
+
+ 176
+ 1070
+
+ Success
+
+ relToCreate
+
+
+ Retrieve_Contacts
+
+ 176
+ 278
+ false
+
+ Retrieved_Contacts
+
+ and
+
+ Id
+ In
+
+ ids
+
+
+ false
+
+ true
+
+
+ Choose_Field_Worker
+
+ 176
+ 158
+ true
+ true
+ true
+
+ Retrieve_Contacts
+
+
+ field_worker_choices
+ fieldWorkerChoiceSet
+ String
+ Choose the Field Worker
+ DropdownBox
+ false
+
+
+ Choose_the_relationship_type
+ RelationshipTypes
+ String
+ Choose the relationship type
+ DropdownBox
+ false
+
+ true
+ true
+
+
+ Success
+
+ 176
+ 1190
+ false
+ true
+ false
+
+ success_message
+ <p>Relationships created!</p>
+ DisplayText
+
+ true
+ true
+
+
+ 50
+ 0
+
+ Choose_Field_Worker
+
+
+ Active
+
+ contactIds
+ SObject
+ true
+ false
+ false
+ Contact
+
+
+ fieldWorker
+ SObject
+ false
+ false
+ false
+ Contact
+
+
+ ids
+ String
+ true
+ true
+ false
+
+
+ relSingle
+ SObject
+ false
+ false
+ false
+ GRMS__FieldWorkerClientRelation__c
+
+
+ relToCreate
+ SObject
+ true
+ false
+ false
+ GRMS__FieldWorkerClientRelation__c
+
+
diff --git a/unpackaged-base-flows/config/base-samples/objects/Contact/webLinks/Assign_to_Field_Worker.webLink-meta.xml b/unpackaged-base-flows/config/base-samples/objects/Contact/webLinks/Assign_to_Field_Worker.webLink-meta.xml
new file mode 100644
index 0000000..3390478
--- /dev/null
+++ b/unpackaged-base-flows/config/base-samples/objects/Contact/webLinks/Assign_to_Field_Worker.webLink-meta.xml
@@ -0,0 +1,14 @@
+
+
+ Assign_to_Field_Worker
+ online
+ massActionButton
+ UTF-8
+ 600
+ url
+ Assign to Field Worker
+ sidebar
+ false
+ true
+ /flow/Create_Relationships_from_List_View
+