In this article:
Use Case: Gives users the ability to automate the copying of Partner Account Names from Crossbeam Overlap records to their corresponding Account records.
Objective: Categorize Partners according to Crossbeam population and store the categorized Partner Names in (4) text fields on the Account. The field values on the Account will be replaced with the most current overlap values any time a Crossbeam Overlap record is created, updated or deleted.
Fields:
Partners (Customer)
This field will display names of partners that have the given account as a customer.
Partners (Opportunity)
This field will display names of partners that are actively engaged with the account as an Open Opportunity.
Partners (Prospect)
This field will display names of partners that consider the account to be a prospect.
Partners (Catch All)
This field is intended to capture “Custom Populations” partners may be sharing with you that do not contain the words “Customer” “Opportunity” or “Prospect.” Custom Populations can have any name.
✍️Note to Salesforce Administrator: Check with the business end-user to understand which fields are needed. The above is intended to be comprehensive and may not be necessary for all users. For instance, within Clari many users will only focus on Partners (Customer) and Partners (Opportunity).
VIDEO: Overview of Flow Creation
Technical Build Instructions
Step 1) Create the following custom fields on Account Object in Salesforce
Partners (Customer)
Type: Text Area (Long)
Field Label: Partners (Customer)
Field Name: Partners_Customer
(Optional) Length: 1,000 (**limit is only required if referencing this field in a Salesforce Report)
Partners (Opportunity)
Type: Text Area (Long)
Field Label: Partners (Opportunity)
Field Name: Partners_Opportunity
(Optional) Length: 1,000 (**limit is only required if referencing this field in a Salesforce Report)
Partners (Prospect)
Type: Text Area (Long)
Field Label: Partners (Prospect)
Field Name: Partners_Prospect
(Optional) Length: 1,000 (**limit is only required if referencing this field in a Salesforce Report)
Optional Repeat for any additional Custom Populations that you would like to Create. Replace Population Name in the Field Label and Field Name with the name of the custom population you are targeting.
Partners (Catch All)
Type: Text Area (Long)
Field Label: Partners (Catch All)
Field Name: Partners_Catch_All
Help Text: This field serves as a catch-all for remaining Partners which which do not match criteria for predefined populations listed on the Account page
(Optional) Length: 1,000 (**limit is only required if referencing this field in a Salesforce Report)
Step 2) Create an Auto Launched Flow in Salesforce
✍️Note
Make sure the canvas is to Auto-Layout. This will ensure the documentation is easier to follow.
Navigate to Setup > Process Automation > Flows > “New Flow”
Select “Autolaunched Flow (No Trigger)”, then click “Create”
Flow Label: [Crossbeam Overlap] - Populate Partner Names
Flow API Name: Crossbeam_Overlap_Populate_Partner_Names
Create Resources (Access Toolbox > Manager in the upper
left corner of the canvas) Click New Resource
Loom Resources Overview @ 8:18Create the following Resource Type = Variable
recordId
API Name: recordId
Data Type: Record
Object: Crossbeam Overlap
Available for input: TRUE
varRecordWasDeleted
API Name: varRecordWasDeleted
Data Type: Boolean
Available for input: TRUE
varPartnerNamesCustomer
API Name: varPartnerNamesCustomer
Data Type: Text
varPartnerNamesOpportunity
API Name: varPartnerNamesOpportunity
Data Type: Text
varPartnerNamesProspect
API Name: varPartnerNamesProspect
Data Type: Text
Optional Repeat for all Custom Populations for which you capturing values. You should have one variable for each field created on the Account Object in Step 1.
varPartnerNamesCatchAll
API Name: varPartnerNamesCatchAll
Data Type: Text
varCapturedPartnerNames
API Name: varCapturedPartnerNames
Data Type: Text
collOverlaps
API Name: collOverlaps
Data Type: Record
Allow Multiple Values (collection): TRUE
Object: Crossbeam Overlap
Create the following Resource Type = Formula
forPartnerNamesCustomer
API Name: forPartnerNamesCustomer
Data Type: Text
Formula: LEFT({!varPartnerNamesCustomer}, LEN({!varPartnerNamesCustomer}) - 2)
forPartnerNamesOpportunity
API Name: forPartnerNamesOpportunity
Data Type: Text
Formula: LEFT({!varPartnerNamesOpportunity}, LEN({!varPartnerNamesOpportunity}) - 2)
forPartnerNamesProspect
API Name: forPartnerNamesProspect
Data Type: Text
Formula: LEFT({!varPartnerNamesProspect}, LEN({!varPartnerNamesProspect}) - 2)
forPartnerNamesCatchAll
API Name: forPartnerNamesCatchAll
Data Type: Text
Formula: LEFT({!varPartnerNamesCatchAll}, LEN({!varPartnerNamesCatchAll}) - 2)
Optional Repeat for all Custom Populations for which you capture values. You should have one formula for each variable created in the previous step.
Label: Triggered by…
API Name: Triggered_By
Outcome 1
Label: Deleted Record
Outcome API Name: Deleted_Record
Condition Requirements to Execute Outcome: All conditions Are Met (AND)
Condition 1
Resource: {!varRecordWasDeleted}
Operator: Equals
Value: {!$GlobalConstant.True}
Default Outcome
Label: Updated/Created Record
On the “Deleted Record” Path of the Decision Element
Label: Get Overlaps
API Name: Get_Overlaps
Object: Crossbeam Overlap
Condition Requirements: All Conditions Are Met (AND)
Condition 1
Field: xbeamprod__Account__c
Operator: Equals
Value: {!recordId.xbeamprod__Account__c}
Condition 2
Field: xbeamprod__Account__c
Operator: Does Not Equal
Value: {!$GlobalConstant.EmptyString}
Condition 3
Field: Id
Operator: Does Not Equal
Value: {!recordId.Id}
How Many Records to Store: All Records
How to Store Record Data: Automatically store all fields
Label: Add Records to Collection Deleted
API Name: Add_Records_to_Collection_Deleted
Variable: {!collOverlaps}
Operator: Equals
Value: {!Get_Overlaps_Deleted}
On the “Updated/Created Record” Path of the Decision Element
Label: Get Overlaps - Updated
API Name: Get_Overlaps_Updated
Object: Crossbeam Overlap
Condition Requirements: All Conditions Are Met (AND)
Condition 1
Field: xbeamprod__Account__c
Operator: Equals
Value: {!recordId.xbeamprod__Account__c}
Condition 2
Field: xbeamprod__Account__c
Operator: Does Not Equal
Value: {!$GlobalConstant.EmptyString}
How Many Records to Store: All Records
How to Store Record Data: Automatically store all fields
Label: Add Records to Collection Updated
API Name: Add_Records_to_Collection_Updated
Variable: {!collOverlaps}
Operator: Equals
Value: {!Get_Overlaps_Updated}
Label: Loop Overlaps
API Name: Loop_Overlaps
Collection Variable: {!collOverlaps}
Direction: First item to last item
Create a Formula Resource (Same process as item #2)
forPartnerNames
API Name: forPartnerNames
Data Type: Text
Formula: {!Loop_Overlaps.xbeamprod__Partner_Name__c} & ", "
Add the following elements to the “For Each” path
Label: Overlap Population Contains Customer
API Name: Overlap_Population_Contains_Customer
Outcome 1
Label: Customer
Outcome API Name: Customer
Condition Requirements to Execute Outcome: Custom Condition Logic Is Met
Condition Logic: 1 AND NOT 2
Condition 1
Resource: {!Loop_Overlaps.xbeamprod__Partner_Population__c}
Operator: Contains
Value: Customer
Condition 2
Resource: {!varPartnerNamesCustomer}
Operator: Contains
Value: {!Loop_Overlaps.xbeamprod__Partner_Name__c}
When to Execute Outcome: If the condition requirements are met
Label: Assign Partner Names Customer
API Name: Assign_Partner_Names_Customer
Variable: {!varPartnerNamesCustomer}
Operator: Add
Value: {!forPartnerNames}
Variable: {!varCapturedPartnerNames}
Operator: Add
Value: {!forPartnerNames}
Label: Overlap Population Contains Opportunity
API Name: Overlap_Population_Contains_Opportunity
Outcome 1
Label: Opportunity
Outcome API Name: Opportunity
Condition Requirements to Execute Outcome: Custom Condition Logic Is Met
Condition Logic: 1 AND NOT 2
Condition 1
Resource: {!Loop_Overlaps.xbeamprod__Partner_Population__c}
Operator: Contains
Value: Opportunity
Condition 2
Resource: {!varPartnerNamesOpportunity}
Operator: Contains
Value: {!Loop_Overlaps.xbeamprod__Partner_Name__c}
Label: Assign Partner Names Opportunity
API Name: Assign_Partner_Names_Opportunity
Variable: {!varPartnerNamesOpportunity}
Operator: Add
Value: {!forPartnerNames}
Variable: {!varCapturedPartnerNames}
Operator: Add
Value: {!forPartnerNames}
Label: Overlap Population Contains Prospect
API Name: Overlap_Population_Contains_Prospect
Outcome 1
Label: Prospect
Outcome API Name: Prospect
Condition Requirements to Execute Outcome: Custom Condition Logic Is Met
Condition Logic: 1 AND NOT 2
Condition 1
Resource: {!Loop_Overlaps.xbeamprod__Partner_Population__c}
Operator: Contains
Value: Prospect
Condition 2
Resource: {!varPartnerNamesProspect}
Operator: Contains
Value: {!Loop_Overlaps.xbeamprod__Partner_Name__c}
Label: Assign Partner Names Prospect
API Name: Assign_Partner_Names_Prospect
Variable: {!varPartnerNamesProspect}
Operator: Add
Value: {!forPartnerNames}
Variable: {!varCapturedPartnerNames}
Operator: Add
Value: {!forPartnerNames}
Optional Repeat all Previous Steps (8C) for any other Custom populations you are wishing to capture
Label: Loop Overlaps Again
API Name: Loop_Overlaps_Again
Collection Variable: {!collOverlaps}
Direction: First item to last item
Create a Formula Resource (Same process as item #2)
forPartnerNames
API Name: forPartnerNames2
Data Type: Text
Formula: {!Loop_Overlaps_Again.xbeamprod__Partner_Name__c} & ", "
Add the following elements to the “For Each” path
Label: Overlap Population Catch All
API Name: Overlap_Population_Catch_All
Outcome 1
Label: Catch All
Outcome API Name: Catch All
Condition Requirements to Execute Outcome: Custom Condition Logic Is Met
Condition Logic: NOT 1
Condition 1
Resource: {!varCapturedPartnerNames}
Operator: Contains
Value: {!Loop_Overlaps_Again.xbeamprod__Partner_Name__c}
Label: Assign Partner Names Catch All
API Name: Assign_Partner_Names_Catch_All
Variable: {!varPartnerNamesCatchAll}
Operator: Add
Value: {!forPartnerNames2}
Add the following elements to the “After Last” path of the 2nd Loop
Label: Update Account
API Name: Update_Account
How to Find Records to Update and Set Their Values: Specify conditions to identify records, and set fields individually
Object: Account
Condition Requirements to Update Records: All Conditions Are Met (AND)
Condition 1
Field: Id
Operator: Equals
Value: {!recordId.xbeamprod__Account__c}
Set Field Values for the Account Records
Field 1
Field: Partners_Customer__c
Value: {!forPartnerNamesCustomer}
Field 2
Field: Partners_Opportunity__c
Value: {!forPartnerNamesOpportunity}
Field 3
Field: Partners_Prospect__c
Value: {!forPartnerNamesProspect}
Field 3
Field: Partners_Catch_All__c
Value: {!forPartnerNamesCatchAll}
Repeat the previous step for any additional custom populations you are capturing
Click on the “Update Account” element created in step 7 and select “Add Fault Path”
Save and Activate Flow
Step 3) Create a Record Triggered Flow in Salesforce
✍️Note
Make sure the canvas is to Auto-Layout. This will ensure the documentation is easier to follow.
Navigate to Setup > Process Automation > Flows > “New Flow”
Select “Record-Triggered Flow, then click “Create”
Object = Crossbeam Overlap
Trigger the Flow When: A record is created or updated
Condition Requirements: All Conditions Are Met (AND)
Field: xbeamprod__Account__c
Operator: Is Null
Value: {!$GlobalConstant.False}
When to Run the Flow for Updated Records: Every time a record is updated and meets the condition requirements
Optimize the Flow for: Actions and Related Records
Referenced Flow: [Crossbeam Overlap] - Populate Partner Names
Label: Populate Partner Names
API Name: Populate_Partner_Names
Set Input Values
recordId
Include = TRUE
Resource = {!$Record}
varRecordWasDeleted
Include = TRUE
Resource = {!$GlobalConstant.False}
Save and Activate Flow
Step 4) Save A COPY of the Record Triggered Flow you just created
❗️Important
The following will be an entirely new flow, not a new version of the same flow.
Make sure you have the [Crossbeam Overlap] After Save still open
Click “Save As” in the upper right hand corner
Choose “A New Flow” (Do NOT Select “A New Version”)
Flow Label: [Crossbeam Overlap] Deleted
Flow API Name: Crossbeam_Overlap_Deleted
Click on the Start Element and click “Edit”
Set the option for “Trigger the Flow When:” to “A record is deleted”
Click “Done”
Click “Edit Element” on the “Populate Partner Names” Subflow
Update the Value for “varRecordWasDeleted to {!$GlobalConstant.True}
Save and Activate Flow