Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLOW: Create a Membership Transaction Business Process Listener Flow #162

Open
wants to merge 2 commits into
base: metecho/february-2024-sprint
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<decisions>
<name>Check_Product_on_Opportunity_Product</name>
<label>Check Product on Opportunity Product</label>
<locationX>182</locationX>
<locationY>494</locationY>
<defaultConnector>
<targetReference>Membership_Upgrade_Downgrade_fire</targetReference>
</defaultConnector>
<defaultConnectorLabel>Default Outcome</defaultConnectorLabel>
<rules>
<name>Opportunity_Product_Product</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>Query_Membership_Record</leftValueReference>
<operator>IsNull</operator>
<rightValue>
<booleanValue>true</booleanValue>
</rightValue>
</conditions>
<connector>
<targetReference>Membership_Renewal_fire</targetReference>
</connector>
<label>Opportunity Product = Product</label>
</rules>
</decisions>
<decisions>
<name>Is_the_Membership_populated</name>
<label>Is the Membership populated</label>
<locationX>380</locationX>
<locationY>278</locationY>
<defaultConnector>
<targetReference>Membership_Finder</targetReference>
</defaultConnector>
<defaultConnectorLabel>Default Outcome</defaultConnectorLabel>
<rules>
<name>Membership_is_populated</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>Opportunity_Line_Item_Query</leftValueReference>
<operator>IsNull</operator>
<rightValue>
<booleanValue>false</booleanValue>
</rightValue>
</conditions>
<connector>
<targetReference>Query_Membership_Record</targetReference>
</connector>
<label>Membership is populated</label>
</rules>
</decisions>
<environments>Default</environments>
<interviewLabel>Create a Membership Transaction Business Process Listener Flow {!$Flow.CurrentDateTime}</interviewLabel>
<label>Create a Membership Transaction Business Process Listener Flow</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>Membership_Finder</name>
<label>Membership Finder</label>
<locationX>578</locationX>
<locationY>386</locationY>
<inputAssignments>
<field>Record_Id__c</field>
<value>
<elementReference>Opportunity_Line_Item_Query.Id</elementReference>
</value>
</inputAssignments>
<object>DPEV_Membership_Finder__e</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordCreates>
<recordCreates>
<name>Membership_Renewal_fire</name>
<label>Membership Renewal fire</label>
<locationX>50</locationX>
<locationY>602</locationY>
<inputAssignments>
<field>Record_Id__c</field>
<value>
<elementReference>Opportunity_Line_Item_Query.Id</elementReference>
</value>
</inputAssignments>
<object>DPEV_Membership_Renewal__e</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordCreates>
<recordCreates>
<name>Membership_Upgrade_Downgrade_fire</name>
<label>Membership Upgrade/Downgrade fire</label>
<locationX>314</locationX>
<locationY>602</locationY>
<inputAssignments>
<field>Record_Id__c</field>
<value>
<elementReference>Opportunity_Line_Item_Query.Id</elementReference>
</value>
</inputAssignments>
<object>DPEV_Create_Membership_Upgrade_Downgrade__e</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordCreates>
<recordLookups>
<description>Query for the Opportunity Line Item provided in the Record Id Field</description>
<name>Opportunity_Line_Item_Query</name>
<label>Opportunity Line Item Query</label>
<locationX>380</locationX>
<locationY>170</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Is_the_Membership_populated</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>
<queriedFields>Id</queriedFields>
<queriedFields>Membership__c</queriedFields>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<recordLookups>
<name>Query_Membership_Record</name>
<label>Query Membership Record</label>
<locationX>182</locationX>
<locationY>386</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Check_Product_on_Opportunity_Product</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Id</field>
<operator>EqualTo</operator>
<value>
<elementReference>Opportunity_Line_Item_Query.Membership__c</elementReference>
</value>
</filters>
<getFirstRecordOnly>true</getFirstRecordOnly>
<object>Membership__c</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<start>
<locationX>254</locationX>
<locationY>0</locationY>
<connector>
<targetReference>Opportunity_Line_Item_Query</targetReference>
</connector>
<object>BPEV_Membership_Transaction__e</object>
<triggerType>PlatformEvent</triggerType>
</start>
<status>Active</status>
<variables>
<name>QueryMembership</name>
<dataType>SObject</dataType>
<isCollection>false</isCollection>
<isInput>false</isInput>
<isOutput>false</isOutput>
<objectType>Membership__c</objectType>
</variables>
</Flow>