Skip to content

Commit

Permalink
Merge pull request #187 from SFDO-Community-Sprints/metecho/june-2024…
Browse files Browse the repository at this point in the history
…-mini-sprint

June 2024 Mini Sprint
  • Loading branch information
selfuntitled authored Sep 26, 2024
2 parents c36de0e + f119860 commit 1ebd2b5
Show file tree
Hide file tree
Showing 38 changed files with 2,059 additions and 44 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata">
<description>The default utility bar for the FlowsApp application.</description>
<flexiPageRegions>
<itemInstances>
<componentInstance>
<componentName>notes:utilityBarNoteList</componentName>
<identifier>notes_utilityBarNoteList</identifier>
</componentInstance>
</itemInstances>
<name>utilityItems</name>
<type>Region</type>
</flexiPageRegions>
<masterLabel>FlowsApp App Utility Bar</masterLabel>
<template>
<name>one:utilityBarTemplateDesktop</name>
</template>
<type>UtilityBar</type>
</FlexiPage>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata">
<description>The default utility bar for the Sales application.</description>
<flexiPageRegions>
<itemInstances>
<componentInstance>
<componentName>runtime_sales_todo_list:unifiedToDoListAuraWrapper</componentName>
<identifier>runtime_sales_todo_list_unifiedToDoListAuraWrapper</identifier>
</componentInstance>
</itemInstances>
<name>utilityItems</name>
<type>Region</type>
</flexiPageRegions>
<masterLabel>Sales App Utility Bar</masterLabel>
<template>
<name>one:utilityBarTemplateDesktop</name>
</template>
<type>UtilityBar</type>
</FlexiPage>
Original file line number Diff line number Diff line change
@@ -0,0 +1,317 @@
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>60.0</apiVersion>
<decisions>
<description>When products are different, check level and type.</description>
<name>Check_Level_and_Type</name>
<label>Check Level and Type</label>
<locationX>1106</locationX>
<locationY>926</locationY>
<defaultConnectorLabel>Default Outcome</defaultConnectorLabel>
<rules>
<name>Send_for_Renewal</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>Query_for_Opportunity_Line_Item.Membership__r.Type__c</leftValueReference>
<operator>EqualTo</operator>
<rightValue>
<elementReference>Get_Membership_Record.Type__c</elementReference>
</rightValue>
</conditions>
<connector>
<targetReference>Fire_Membership_Renewal_Platform_Event</targetReference>
</connector>
<label>Send for Renewal</label>
</rules>
</decisions>
<decisions>
<name>Compare_Opportunity_and_Membership_Products</name>
<label>Compare Opportunity and Membership Products</label>
<locationX>886</locationX>
<locationY>710</locationY>
<defaultConnectorLabel>Default Outcome</defaultConnectorLabel>
<rules>
<name>Opportunity_Product_Membership_Product_are_the_same</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>Query_for_Opportunity_Line_Item.Product2Id</leftValueReference>
<operator>EqualTo</operator>
<rightValue>
<elementReference>Query_for_Opportunity_Line_Item.Membership__r.Product__c</elementReference>
</rightValue>
</conditions>
<connector>
<targetReference>Fire_Membership_Renewal_Platform_Event</targetReference>
</connector>
<label>Same Products-Opportunity &amp; Membership</label>
</rules>
<rules>
<name>Opportunity_Product_Membership_Product_do_not_match</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>Query_for_Opportunity_Line_Item.Product2Id</leftValueReference>
<operator>NotEqualTo</operator>
<rightValue>
<elementReference>Query_for_Opportunity_Line_Item.Membership__r.Product__c</elementReference>
</rightValue>
</conditions>
<connector>
<targetReference>Determine_if_Membership_Renewal_is_an_Upgrade_or_a_Downgrade</targetReference>
</connector>
<label>Products Don&apos;t Match: Opportunity &amp; Membership</label>
</rules>
</decisions>
<decisions>
<description>Based on the Membership Tier value, determine if the renewal membership is an Upgrade or a Downgrade</description>
<name>Determine_if_Membership_Renewal_is_an_Upgrade_or_a_Downgrade</name>
<label>Determine if Membership Renewal is an Upgrade or a Downgrade</label>
<locationX>798</locationX>
<locationY>818</locationY>
<defaultConnector>
<targetReference>Check_Level_and_Type</targetReference>
</defaultConnector>
<defaultConnectorLabel>Membership Renewal</defaultConnectorLabel>
<rules>
<name>Membership_Upgrade</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>Get_New_Product_ID.Membership_Tier__c</leftValueReference>
<operator>LessThan</operator>
<rightValue>
<elementReference>Get_Old_Product_ID.Product2.Membership_Tier__c</elementReference>
</rightValue>
</conditions>
<connector>
<targetReference>Fire_Membership_Upgrade_Platform_Event</targetReference>
</connector>
<label>Membership Upgrade</label>
</rules>
<rules>
<name>Membership_Downgrade</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>Get_New_Product_ID.Membership_Tier__c</leftValueReference>
<operator>GreaterThan</operator>
<rightValue>
<elementReference>Get_Old_Product_ID.Product2.Membership_Tier__c</elementReference>
</rightValue>
</conditions>
<connector>
<targetReference>Fire_Membership_Downgrade_Platform_Event1</targetReference>
</connector>
<label>Membership Downgrade</label>
</rules>
</decisions>
<decisions>
<name>Membership_Next_Steps</name>
<label>Membership Next Steps</label>
<locationX>886</locationX>
<locationY>494</locationY>
<defaultConnectorLabel>Default Outcome</defaultConnectorLabel>
<rules>
<name>Membership_not_populated</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>Query_for_Opportunity_Line_Item.Membership__c</leftValueReference>
<operator>IsNull</operator>
<rightValue>
<booleanValue>true</booleanValue>
</rightValue>
</conditions>
<connector>
<targetReference>Fire_Membership_Finder_Platform_Event</targetReference>
</connector>
<label>Membership not populated</label>
</rules>
<rules>
<name>Membership_is_populated</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>Query_for_Opportunity_Line_Item.Membership__c</leftValueReference>
<operator>IsNull</operator>
<rightValue>
<booleanValue>false</booleanValue>
</rightValue>
</conditions>
<connector>
<targetReference>Get_Membership_Record</targetReference>
</connector>
<label>Membership is populated</label>
</rules>
</decisions>
<description>Listens for the BPEV-Membership Transaction and queries the Opportunity Line item before determining next steps</description>
<environments>Default</environments>
<interviewLabel>BPEV Listener - Membership Transaction {!$Flow.CurrentDateTime}</interviewLabel>
<label>BPEV Listener - Membership Transaction</label>
<processMetadataValues>
<name>BuilderType</name>
<value>
<stringValue>LightningFlowBuilder</stringValue>
</value>
</processMetadataValues>
<processMetadataValues>
<name>CanvasMode</name>
<value>
<stringValue>AUTO_LAYOUT_CANVAS</stringValue>
</value>
</processMetadataValues>
<processMetadataValues>
<name>OriginBuilderType</name>
<value>
<stringValue>LightningFlowBuilder</stringValue>
</value>
</processMetadataValues>
<processType>AutoLaunchedFlow</processType>
<recordCreates>
<name>Fire_Membership_Downgrade_Platform_Event1</name>
<label>Fire Membership Downgrade Platform Event</label>
<locationX>754</locationX>
<locationY>926</locationY>
<inputAssignments>
<field>Record_Id__c</field>
<value>
<elementReference>Query_for_Opportunity_Line_Item.Id</elementReference>
</value>
</inputAssignments>
<object>DPEV_Membership_Downgrade__e</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordCreates>
<recordCreates>
<name>Fire_Membership_Finder_Platform_Event</name>
<label>Fire Membership Finder Platform Event</label>
<locationX>50</locationX>
<locationY>602</locationY>
<inputAssignments>
<field>Record_Id__c</field>
<value>
<elementReference>Query_for_Opportunity_Line_Item.Id</elementReference>
</value>
</inputAssignments>
<object>DPEV_Membership_Finder__e</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordCreates>
<recordCreates>
<name>Fire_Membership_Renewal_Platform_Event</name>
<label>Fire Membership Renewal Platform Event</label>
<locationX>886</locationX>
<locationY>1394</locationY>
<inputAssignments>
<field>Record_Id__c</field>
<value>
<elementReference>Query_for_Opportunity_Line_Item.Id</elementReference>
</value>
</inputAssignments>
<object>DPEV_Membership_Renewal__e</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordCreates>
<recordCreates>
<name>Fire_Membership_Upgrade_Platform_Event</name>
<label>Fire Membership Upgrade Platform Event</label>
<locationX>490</locationX>
<locationY>926</locationY>
<inputAssignments>
<field>Record_Id__c</field>
<value>
<elementReference>Query_for_Opportunity_Line_Item.Id</elementReference>
</value>
</inputAssignments>
<object>DPEV_Membership_Upgrade__e</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordCreates>
<recordLookups>
<description>Get the Membership record that is referenced by the Opportunity Line Item</description>
<name>Get_Membership_Record</name>
<label>Get Membership Record</label>
<locationX>886</locationX>
<locationY>602</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Compare_Opportunity_and_Membership_Products</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Id</field>
<operator>EqualTo</operator>
<value>
<elementReference>Query_for_Opportunity_Line_Item.Membership__r.Id</elementReference>
</value>
</filters>
<getFirstRecordOnly>true</getFirstRecordOnly>
<object>Membership__c</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<recordLookups>
<name>Get_New_Product_ID</name>
<label>Get New Product ID</label>
<locationX>886</locationX>
<locationY>386</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Membership_Next_Steps</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Id</field>
<operator>EqualTo</operator>
<value>
<elementReference>Query_for_Opportunity_Line_Item.Product2.Id</elementReference>
</value>
</filters>
<getFirstRecordOnly>true</getFirstRecordOnly>
<object>Product2</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<recordLookups>
<name>Get_Old_Product_ID</name>
<label>Get Old Product ID</label>
<locationX>886</locationX>
<locationY>278</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Get_New_Product_ID</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Id</field>
<operator>EqualTo</operator>
<value>
<elementReference>$Record.New_Product_ID__c</elementReference>
</value>
</filters>
<getFirstRecordOnly>true</getFirstRecordOnly>
<object>Product2History</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<recordLookups>
<description>Get the line item provided in the Record Id Field of the BPEV - Membership Transaction</description>
<name>Query_for_Opportunity_Line_Item</name>
<label>Query for Opportunity Line Item</label>
<locationX>886</locationX>
<locationY>170</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Get_Old_Product_ID</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Id</field>
<operator>EqualTo</operator>
<value>
<elementReference>$Record.Record_Id__c</elementReference>
</value>
</filters>
<getFirstRecordOnly>true</getFirstRecordOnly>
<object>OpportunityLineItem</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<start>
<locationX>760</locationX>
<locationY>0</locationY>
<connector>
<targetReference>Query_for_Opportunity_Line_Item</targetReference>
</connector>
<object>BPEV_Membership_Transaction__e</object>
<triggerType>PlatformEvent</triggerType>
</start>
<status>Active</status>
</Flow>
Loading

0 comments on commit 1ebd2b5

Please sign in to comment.