From 2f318e0982aacff3809170431172f864603794c5 Mon Sep 17 00:00:00 2001 From: michaelpierce213 Date: Wed, 7 Feb 2024 15:16:54 -0500 Subject: [PATCH 1/3] Platform Events, Flow, and Product field --- .../default/flows/DPEV_Listener.flow-meta.xml | 226 ++++++++++++++++++ .../flows/UTILITY_create_PE.flow-meta.xml | 55 +++++ ...uct Layout for Memberships.layout-meta.xml | 5 +- .../Product2-Product Layout.layout-meta.xml | 6 +- ..._Membership_Transaction__e.object-meta.xml | 9 + .../fields/Record_Id__c.field-meta.xml | 14 ++ .../DPEV_Extend_Membership__e.object-meta.xml | 9 + .../fields/Record_Id__c.field-meta.xml | 14 ++ ...EV_Membership_Downgrade__e.object-meta.xml | 9 + .../fields/Record_Id__c.field-meta.xml | 14 ++ ...DPEV_Membership_Upgrade__e.object-meta.xml | 9 + .../fields/Record_Id__c.field-meta.xml | 14 ++ .../listViews/All.listView-meta.xml | 10 + .../Membership_Weight__c.field-meta.xml | 14 ++ 14 files changed, 406 insertions(+), 2 deletions(-) create mode 100644 force-app/main/default/flows/DPEV_Listener.flow-meta.xml create mode 100644 force-app/main/default/flows/UTILITY_create_PE.flow-meta.xml create mode 100644 force-app/main/default/objects/BPEV_Membership_Transaction__e/BPEV_Membership_Transaction__e.object-meta.xml create mode 100644 force-app/main/default/objects/BPEV_Membership_Transaction__e/fields/Record_Id__c.field-meta.xml create mode 100644 force-app/main/default/objects/DPEV_Extend_Membership__e/DPEV_Extend_Membership__e.object-meta.xml create mode 100644 force-app/main/default/objects/DPEV_Extend_Membership__e/fields/Record_Id__c.field-meta.xml create mode 100644 force-app/main/default/objects/DPEV_Membership_Downgrade__e/DPEV_Membership_Downgrade__e.object-meta.xml create mode 100644 force-app/main/default/objects/DPEV_Membership_Downgrade__e/fields/Record_Id__c.field-meta.xml create mode 100644 force-app/main/default/objects/DPEV_Membership_Upgrade__e/DPEV_Membership_Upgrade__e.object-meta.xml create mode 100644 force-app/main/default/objects/DPEV_Membership_Upgrade__e/fields/Record_Id__c.field-meta.xml create mode 100644 force-app/main/default/objects/Pricebook2/listViews/All.listView-meta.xml create mode 100644 force-app/main/default/objects/Product2/fields/Membership_Weight__c.field-meta.xml diff --git a/force-app/main/default/flows/DPEV_Listener.flow-meta.xml b/force-app/main/default/flows/DPEV_Listener.flow-meta.xml new file mode 100644 index 00000000..05c13be4 --- /dev/null +++ b/force-app/main/default/flows/DPEV_Listener.flow-meta.xml @@ -0,0 +1,226 @@ + + + 59.0 + + Is_Membership_lookup_populated + + 314 + 278 + + Get_Membership + + Yes + + No_MembershipLookupNotPopulated + and + + Get_OpportunityLineItem.Membership__c + IsNull + + true + + + + Create_DPEV_Membership_Finder_PE + + + + + + Is_OppotunityProduct_same_as_Membership_Product + + 578 + 494 + + Is_this_an_upgrade_or_downgrade + + No + + Yes_ProductsMatch + and + + Get_OpportunityLineItem.Product2Id + EqualTo + + Get_Membership.Product__c + + + + Create_DPEV_Extend_Membership + + + + + + Evaluates a custom field on the OpportunityLineItem.Product2 + Is_this_an_upgrade_or_downgrade + + 842 + 602 + No Change + + Upgrade + and + + Get_OpportunityLineItem.Product2.Membership_Weight__c + GreaterThan + + Get_Membership.Product__r.Membership_Weight__c + + + + Create_DPEV_Membership_Upgrade_PE + + + + + Downgrade + and + + Get_OpportunityLineItem.Product2.Membership_Weight__c + LessThan + + Get_Membership.Product__r.Membership_Weight__c + + + + Copy_1_of_Create_DPEV_Membership_Downgrade_PE + + + + + Default + DPEV Listener {!$Flow.CurrentDateTime} + + + BuilderType + + LightningFlowBuilder + + + + CanvasMode + + AUTO_LAYOUT_CANVAS + + + + OriginBuilderType + + LightningFlowBuilder + + + AutoLaunchedFlow + + Creates a Platform Event where Record_Id__c = Id of the found Membership record + Copy_1_of_Create_DPEV_Membership_Downgrade_PE + + 842 + 710 + + Record_Id__c + + Get_Membership.Id + + + DPEV_Membership_Downgrade__e + true + + + Create_DPEV_Extend_Membership + + 314 + 602 + + Record_Id__c + + Get_Membership.Id + + + DPEV_Extend_Membership__e + true + + + Creates a Platform Event where Record_Id__c = OpportunityLineItem Id + Create_DPEV_Membership_Finder_PE + + 50 + 386 + + Record_Id__c + + $Record.Record_Id__c + + + DPEV_Membership_Finder__e + true + + + Creates a Platform Event where Record_Id__c = Id of the found Membership record + Create_DPEV_Membership_Upgrade_PE + + 578 + 710 + + Record_Id__c + + Get_Membership.Id + + + DPEV_Membership_Upgrade__e + true + + + Queries Membership record where Id = Membership__c lookup on OpporutnityLineItem + Get_Membership + + 578 + 386 + false + + Is_OppotunityProduct_same_as_Membership_Product + + and + + Id + EqualTo + + Get_OpportunityLineItem.Membership__c + + + true + Membership__c + true + + + Get_OpportunityLineItem + + 314 + 170 + false + + Is_Membership_lookup_populated + + and + + Id + EqualTo + + $Record.Record_Id__c + + + true + OpportunityLineItem + true + + + 188 + 0 + + Get_OpportunityLineItem + + BPEV_Membership_Transaction__e + PlatformEvent + + Active + diff --git a/force-app/main/default/flows/UTILITY_create_PE.flow-meta.xml b/force-app/main/default/flows/UTILITY_create_PE.flow-meta.xml new file mode 100644 index 00000000..52664c03 --- /dev/null +++ b/force-app/main/default/flows/UTILITY_create_PE.flow-meta.xml @@ -0,0 +1,55 @@ + + + 59.0 + Default + UTILITY - create PE {!$Flow.CurrentDateTime} + + + BuilderType + + LightningFlowBuilder + + + + CanvasMode + + AUTO_LAYOUT_CANVAS + + + + OriginBuilderType + + LightningFlowBuilder + + + Flow + + Create_PE + + 176 + 134 + + Record_Id__c + + varRecordID + + + BPEV_Membership_Transaction__e + true + + + 50 + 0 + + Create_PE + + + Draft + + varRecordID + String + false + true + false + + diff --git a/force-app/main/default/layouts/Product2-Product Layout for Memberships.layout-meta.xml b/force-app/main/default/layouts/Product2-Product Layout for Memberships.layout-meta.xml index bcf670db..d70f6d3e 100644 --- a/force-app/main/default/layouts/Product2-Product Layout for Memberships.layout-meta.xml +++ b/force-app/main/default/layouts/Product2-Product Layout for Memberships.layout-meta.xml @@ -27,6 +27,10 @@ Edit Downgrade_Path__c + + Edit + Membership_Weight__c + @@ -116,7 +120,6 @@ StandardButton 3 - NewEvent QuickAction diff --git a/force-app/main/default/layouts/Product2-Product Layout.layout-meta.xml b/force-app/main/default/layouts/Product2-Product Layout.layout-meta.xml index e764ee82..d83e0373 100644 --- a/force-app/main/default/layouts/Product2-Product Layout.layout-meta.xml +++ b/force-app/main/default/layouts/Product2-Product Layout.layout-meta.xml @@ -29,6 +29,10 @@ Edit Family + + Edit + Membership_Weight__c + @@ -86,7 +90,7 @@ false false - 00h6t000002OIPt + 00hDH000005vnmz 4 0 Default diff --git a/force-app/main/default/objects/BPEV_Membership_Transaction__e/BPEV_Membership_Transaction__e.object-meta.xml b/force-app/main/default/objects/BPEV_Membership_Transaction__e/BPEV_Membership_Transaction__e.object-meta.xml new file mode 100644 index 00000000..146b1020 --- /dev/null +++ b/force-app/main/default/objects/BPEV_Membership_Transaction__e/BPEV_Membership_Transaction__e.object-meta.xml @@ -0,0 +1,9 @@ + + + Deployed + Platform Event that triggers logic based upon the Opportunity Line Item provided + HighVolume + + BPEV - Membership Transactions + PublishAfterCommit + diff --git a/force-app/main/default/objects/BPEV_Membership_Transaction__e/fields/Record_Id__c.field-meta.xml b/force-app/main/default/objects/BPEV_Membership_Transaction__e/fields/Record_Id__c.field-meta.xml new file mode 100644 index 00000000..01a6f93b --- /dev/null +++ b/force-app/main/default/objects/BPEV_Membership_Transaction__e/fields/Record_Id__c.field-meta.xml @@ -0,0 +1,14 @@ + + + Record_Id__c + false + OpportunityLineItem Id + false + false + false + + 255 + false + Text + false + diff --git a/force-app/main/default/objects/DPEV_Extend_Membership__e/DPEV_Extend_Membership__e.object-meta.xml b/force-app/main/default/objects/DPEV_Extend_Membership__e/DPEV_Extend_Membership__e.object-meta.xml new file mode 100644 index 00000000..5b78807d --- /dev/null +++ b/force-app/main/default/objects/DPEV_Extend_Membership__e/DPEV_Extend_Membership__e.object-meta.xml @@ -0,0 +1,9 @@ + + + Deployed + Platform Event to allow data processing for renewal + HighVolume + + DPEV - Extend Memberships + PublishAfterCommit + diff --git a/force-app/main/default/objects/DPEV_Extend_Membership__e/fields/Record_Id__c.field-meta.xml b/force-app/main/default/objects/DPEV_Extend_Membership__e/fields/Record_Id__c.field-meta.xml new file mode 100644 index 00000000..9865f992 --- /dev/null +++ b/force-app/main/default/objects/DPEV_Extend_Membership__e/fields/Record_Id__c.field-meta.xml @@ -0,0 +1,14 @@ + + + Record_Id__c + Membership Id + false + false + false + false + + 255 + false + Text + false + diff --git a/force-app/main/default/objects/DPEV_Membership_Downgrade__e/DPEV_Membership_Downgrade__e.object-meta.xml b/force-app/main/default/objects/DPEV_Membership_Downgrade__e/DPEV_Membership_Downgrade__e.object-meta.xml new file mode 100644 index 00000000..4b868460 --- /dev/null +++ b/force-app/main/default/objects/DPEV_Membership_Downgrade__e/DPEV_Membership_Downgrade__e.object-meta.xml @@ -0,0 +1,9 @@ + + + Deployed + Platform Event that triggers a membership downgrade + HighVolume + + DPEV - Membership Downgrades + PublishAfterCommit + diff --git a/force-app/main/default/objects/DPEV_Membership_Downgrade__e/fields/Record_Id__c.field-meta.xml b/force-app/main/default/objects/DPEV_Membership_Downgrade__e/fields/Record_Id__c.field-meta.xml new file mode 100644 index 00000000..8fe576e4 --- /dev/null +++ b/force-app/main/default/objects/DPEV_Membership_Downgrade__e/fields/Record_Id__c.field-meta.xml @@ -0,0 +1,14 @@ + + + Record_Id__c + false + Membership Id + false + false + false + + 255 + false + Text + false + diff --git a/force-app/main/default/objects/DPEV_Membership_Upgrade__e/DPEV_Membership_Upgrade__e.object-meta.xml b/force-app/main/default/objects/DPEV_Membership_Upgrade__e/DPEV_Membership_Upgrade__e.object-meta.xml new file mode 100644 index 00000000..ebe30f5d --- /dev/null +++ b/force-app/main/default/objects/DPEV_Membership_Upgrade__e/DPEV_Membership_Upgrade__e.object-meta.xml @@ -0,0 +1,9 @@ + + + Deployed + Platform event that triggers upgrading a Membership + HighVolume + + DPEV - Membership Upgrades + PublishAfterCommit + diff --git a/force-app/main/default/objects/DPEV_Membership_Upgrade__e/fields/Record_Id__c.field-meta.xml b/force-app/main/default/objects/DPEV_Membership_Upgrade__e/fields/Record_Id__c.field-meta.xml new file mode 100644 index 00000000..9865f992 --- /dev/null +++ b/force-app/main/default/objects/DPEV_Membership_Upgrade__e/fields/Record_Id__c.field-meta.xml @@ -0,0 +1,14 @@ + + + Record_Id__c + Membership Id + false + false + false + false + + 255 + false + Text + false + diff --git a/force-app/main/default/objects/Pricebook2/listViews/All.listView-meta.xml b/force-app/main/default/objects/Pricebook2/listViews/All.listView-meta.xml new file mode 100644 index 00000000..e6c66313 --- /dev/null +++ b/force-app/main/default/objects/Pricebook2/listViews/All.listView-meta.xml @@ -0,0 +1,10 @@ + + + All + PRICEBOOK2.NAME + PRICEBOOK2.IS_ACTIVE + PRICEBOOK2.DESCRIPTION + PRICEBOOK2.LAST_UPDATE + Everything + + diff --git a/force-app/main/default/objects/Product2/fields/Membership_Weight__c.field-meta.xml b/force-app/main/default/objects/Product2/fields/Membership_Weight__c.field-meta.xml new file mode 100644 index 00000000..be7e5682 --- /dev/null +++ b/force-app/main/default/objects/Product2/fields/Membership_Weight__c.field-meta.xml @@ -0,0 +1,14 @@ + + + Membership_Weight__c + Used in Flows to determine if a membership is an upgrade / downgrade + false + For membership products, set weights to "rank" for upgrade / downgrade. + + 18 + false + 0 + false + Number + false + From 84b59a7db0ae6630a11a3c5b13ac9312445cf0ea Mon Sep 17 00:00:00 2001 From: michaelpierce213 Date: Wed, 7 Feb 2024 15:56:00 -0500 Subject: [PATCH 2/3] Agreed upon Flow between conflicting Tasks --- .../default/flows/DPEV_Listener.flow-meta.xml | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/force-app/main/default/flows/DPEV_Listener.flow-meta.xml b/force-app/main/default/flows/DPEV_Listener.flow-meta.xml index 05c13be4..58671ff8 100644 --- a/force-app/main/default/flows/DPEV_Listener.flow-meta.xml +++ b/force-app/main/default/flows/DPEV_Listener.flow-meta.xml @@ -27,8 +27,8 @@ - Is_OppotunityProduct_same_as_Membership_Product - + Is_OpportunityProduct_same_as_Membership_Product + 578 494 @@ -84,11 +84,12 @@ - Copy_1_of_Create_DPEV_Membership_Downgrade_PE + Create_DPEV_Membership_Downgrade_PE + Platform Event triggered Flow that evaluates the next action to take in Membership processing Default DPEV Listener {!$Flow.CurrentDateTime} @@ -112,32 +113,33 @@ AutoLaunchedFlow - Creates a Platform Event where Record_Id__c = Id of the found Membership record - Copy_1_of_Create_DPEV_Membership_Downgrade_PE - - 842 - 710 + Create a + Create_DPEV_Extend_Membership + + 314 + 602 Record_Id__c Get_Membership.Id - DPEV_Membership_Downgrade__e + DPEV_Extend_Membership__e true - Create_DPEV_Extend_Membership - - 314 - 602 + Creates a Platform Event where Record_Id__c = Id of the OpportunityLineItem + Create_DPEV_Membership_Downgrade_PE + + 842 + 710 Record_Id__c - Get_Membership.Id + $Record.Record_Id__c - DPEV_Extend_Membership__e + DPEV_Membership_Downgrade__e true @@ -156,7 +158,7 @@ true - Creates a Platform Event where Record_Id__c = Id of the found Membership record + Creates a Platform Event where Record_Id__c = Id of the OpportunityLineItem Create_DPEV_Membership_Upgrade_PE 578 @@ -164,7 +166,7 @@ Record_Id__c - Get_Membership.Id + $Record.Record_Id__c DPEV_Membership_Upgrade__e @@ -178,7 +180,7 @@ 386 false - Is_OppotunityProduct_same_as_Membership_Product + Is_OpportunityProduct_same_as_Membership_Product and From 802cd06cc6dea96672f14ca89d4ec5cf9b5b3d3a Mon Sep 17 00:00:00 2001 From: Chris Pifer Date: Fri, 26 Apr 2024 00:25:46 -0400 Subject: [PATCH 3/3] API version to 48 --- cumulusci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cumulusci.yml b/cumulusci.yml index 3d0d6acb..c1784e5d 100644 --- a/cumulusci.yml +++ b/cumulusci.yml @@ -3,7 +3,7 @@ project: name: Membership-Management package: name: Membership-Management - api_version: '59.0' + api_version: '48.0' source_format: sfdx tasks: