Skip to main content
Add Crossbeam Overlap Data to Account Object
Gdaly Berlin avatar
Written by Gdaly Berlin
Updated over a week ago

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:

  1. Partners (Customer)

    1. This field will display names of partners that have the given account as a customer.

  2. Partners (Opportunity)

    1. This field will display names of partners that are actively engaged with the account as an Open Opportunity.

  3. Partners (Prospect)

    1. This field will display names of partners that consider the account to be a prospect.

  4. Partners (Catch All)

    1. 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

  1. Partners (Customer)

    1. Type: Text Area (Long)

    2. Field Label: Partners (Customer)

    3. Field Name: Partners_Customer

    4. (Optional) Length: 1,000 (**limit is only required if referencing this field in a Salesforce Report)

  2. Partners (Opportunity)

    1. Type: Text Area (Long)

    2. Field Label: Partners (Opportunity)

    3. Field Name: Partners_Opportunity

    4. (Optional) Length: 1,000 (**limit is only required if referencing this field in a Salesforce Report)

  3. Partners (Prospect)

    1. Type: Text Area (Long)

    2. Field Label: Partners (Prospect)

    3. Field Name: Partners_Prospect

    4. (Optional) Length: 1,000 (**limit is only required if referencing this field in a Salesforce Report)

  4. 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.

  5. Partners (Catch All)

    1. Type: Text Area (Long)

    2. Field Label: Partners (Catch All)

    3. Field Name: Partners_Catch_All

    4. 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

    5. (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.


  1. Navigate to Setup > Process Automation > Flows > “New Flow”

    1. Select “Autolaunched Flow (No Trigger)”, then click “Create”

    2. Flow Label: [Crossbeam Overlap] - Populate Partner Names

    3. Flow API Name: Crossbeam_Overlap_Populate_Partner_Names

  2. Create Resources (Access Toolbox > Manager in the upper
    ​left corner of the canvas) Click New Resource

    Loom Resources Overview @ 8:18

    1. Create the following Resource Type = Variable

      1. recordId

        1. API Name: recordId

        2. Data Type: Record

        3. Object: Crossbeam Overlap

        4. Available for input: TRUE

      2. varRecordWasDeleted

        1. API Name: varRecordWasDeleted

        2. Data Type: Boolean

        3. Available for input: TRUE​

      3. varPartnerNamesCustomer

        1. API Name: varPartnerNamesCustomer

        2. Data Type: Text

      4. varPartnerNamesOpportunity

        1. API Name: varPartnerNamesOpportunity

        2. Data Type: Text​

      5. varPartnerNamesProspect

        1. API Name: varPartnerNamesProspect

        2. Data Type: Text

      6. 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.

      7. varPartnerNamesCatchAll

        1. API Name: varPartnerNamesCatchAll

        2. Data Type: Text

      8. varCapturedPartnerNames

        1. API Name: varCapturedPartnerNames

        2. Data Type: Text​

      9. collOverlaps

        1. API Name: collOverlaps

        2. Data Type: Record

        3. Allow Multiple Values (collection): TRUE

        4. Object: Crossbeam Overlap

    2. Create the following Resource Type = Formula

      1. forPartnerNamesCustomer

        1. API Name: forPartnerNamesCustomer

        2. Data Type: Text

        3. Formula: LEFT({!varPartnerNamesCustomer}, LEN({!varPartnerNamesCustomer}) - 2)

      2. forPartnerNamesOpportunity

        1. API Name: forPartnerNamesOpportunity

        2. Data Type: Text

        3. Formula: LEFT({!varPartnerNamesOpportunity}, LEN({!varPartnerNamesOpportunity}) - 2)

      3. forPartnerNamesProspect

        1. API Name: forPartnerNamesProspect

        2. Data Type: Text

        3. Formula: LEFT({!varPartnerNamesProspect}, LEN({!varPartnerNamesProspect}) - 2)

      4. forPartnerNamesCatchAll

        1. API Name: forPartnerNamesCatchAll

        2. Data Type: Text

        3. Formula: LEFT({!varPartnerNamesCatchAll}, LEN({!varPartnerNamesCatchAll}) - 2)

      5. Optional Repeat for all Custom Populations for which you capture values. You should have one formula for each variable created in the previous step.

    1. Label: Triggered by…

    2. API Name: Triggered_By

    3. Outcome 1

      1. Label: Deleted Record

      2. Outcome API Name: Deleted_Record

      3. Condition Requirements to Execute Outcome: All conditions Are Met (AND)

      4. Condition 1

        1. Resource: {!varRecordWasDeleted}

        2. Operator: Equals

        3. Value: {!$GlobalConstant.True}

    4. Default Outcome

      1. Label: Updated/Created Record

  3. On the “Deleted Record” Path of the Decision Element

      1. Label: Get Overlaps

      2. API Name: Get_Overlaps

      3. Object: Crossbeam Overlap

      4. Condition Requirements: All Conditions Are Met (AND)

      5. Condition 1

        1. Field: xbeamprod__Account__c

        2. Operator: Equals

        3. Value: {!recordId.xbeamprod__Account__c}​

      6. Condition 2

        1. Field: xbeamprod__Account__c

        2. Operator: Does Not Equal

        3. Value: {!$GlobalConstant.EmptyString}

      7. Condition 3

        1. Field: Id

        2. Operator: Does Not Equal

        3. Value: {!recordId.Id}

      8. How Many Records to Store: All Records

      9. How to Store Record Data: Automatically store all fields

      1. Label: Add Records to Collection Deleted

      2. API Name: Add_Records_to_Collection_Deleted

      3. Variable: {!collOverlaps}

        1. Operator: Equals

        2. Value: {!Get_Overlaps_Deleted}

  4. On the “Updated/Created Record” Path of the Decision Element

      1. Label: Get Overlaps - Updated

      2. API Name: Get_Overlaps_Updated

      3. Object: Crossbeam Overlap

      4. Condition Requirements: All Conditions Are Met (AND)

      5. Condition 1

        1. Field: xbeamprod__Account__c

        2. Operator: Equals

        3. Value: {!recordId.xbeamprod__Account__c}

      6. Condition 2

        1. Field: xbeamprod__Account__c

        2. Operator: Does Not Equal

        3. Value: {!$GlobalConstant.EmptyString}

      7. How Many Records to Store: All Records

      8. How to Store Record Data: Automatically store all fields

      1. Label: Add Records to Collection Updated

      2. API Name: Add_Records_to_Collection_Updated

      3. Variable: {!collOverlaps}

        1. Operator: Equals

        2. Value: {!Get_Overlaps_Updated}

    1. Label: Loop Overlaps

    2. API Name: Loop_Overlaps

    3. Collection Variable: {!collOverlaps}

    4. Direction: First item to last item

  5. Create a Formula Resource (Same process as item #2)

    1. forPartnerNames

      1. API Name: forPartnerNames

      2. Data Type: Text

      3. Formula: {!Loop_Overlaps.xbeamprod__Partner_Name__c} & ", "

  6. Add the following elements to the “For Each” path

      1. Label: Overlap Population Contains Customer

      2. API Name: Overlap_Population_Contains_Customer

      3. Outcome 1

        1. Label: Customer

        2. Outcome API Name: Customer

        3. Condition Requirements to Execute Outcome: Custom Condition Logic Is Met

        4. Condition Logic: 1 AND NOT 2

        5. Condition 1

          1. Resource: {!Loop_Overlaps.xbeamprod__Partner_Population__c}

          2. Operator: Contains

          3. Value: Customer

        6. Condition 2

          1. Resource: {!varPartnerNamesCustomer}

          2. Operator: Contains

          3. Value: {!Loop_Overlaps.xbeamprod__Partner_Name__c}

        7. When to Execute Outcome: If the condition requirements are met

        1. Label: Assign Partner Names Customer

        2. API Name: Assign_Partner_Names_Customer

        3. Variable: {!varPartnerNamesCustomer}

          1. Operator: Add

          2. Value: {!forPartnerNames}

        4. Variable: {!varCapturedPartnerNames}

          1. Operator: Add

          2. Value: {!forPartnerNames}

      1. Label: Overlap Population Contains Opportunity

      2. API Name: Overlap_Population_Contains_Opportunity

      3. Outcome 1

        1. Label: Opportunity

        2. Outcome API Name: Opportunity

        3. Condition Requirements to Execute Outcome: Custom Condition Logic Is Met

        4. Condition Logic: 1 AND NOT 2

        5. Condition 1

          1. Resource: {!Loop_Overlaps.xbeamprod__Partner_Population__c}

          2. Operator: Contains

          3. Value: Opportunity

        6. Condition 2

          1. Resource: {!varPartnerNamesOpportunity}

          2. Operator: Contains

          3. Value: {!Loop_Overlaps.xbeamprod__Partner_Name__c}

        1. Label: Assign Partner Names Opportunity

        2. API Name: Assign_Partner_Names_Opportunity

        3. Variable: {!varPartnerNamesOpportunity}

          1. Operator: Add

          2. Value: {!forPartnerNames}

        4. Variable: {!varCapturedPartnerNames}

          1. Operator: Add

          2. Value: {!forPartnerNames}

      1. Label: Overlap Population Contains Prospect

      2. API Name: Overlap_Population_Contains_Prospect

      3. Outcome 1

        1. Label: Prospect

        2. Outcome API Name: Prospect

        3. Condition Requirements to Execute Outcome: Custom Condition Logic Is Met

        4. Condition Logic: 1 AND NOT 2

        5. Condition 1

          1. Resource: {!Loop_Overlaps.xbeamprod__Partner_Population__c}

          2. Operator: Contains

          3. Value: Prospect

        6. Condition 2

          1. Resource: {!varPartnerNamesProspect}

          2. Operator: Contains

          3. Value: {!Loop_Overlaps.xbeamprod__Partner_Name__c}

        1. Label: Assign Partner Names Prospect

        2. API Name: Assign_Partner_Names_Prospect

        3. Variable: {!varPartnerNamesProspect}

          1. Operator: Add

          2. Value: {!forPartnerNames}

        4. Variable: {!varCapturedPartnerNames}

          1. Operator: Add

          2. Value: {!forPartnerNames}

    1. Optional Repeat all Previous Steps (8C) for any other Custom populations you are wishing to capture

    1. Label: Loop Overlaps Again

    2. API Name: Loop_Overlaps_Again

    3. Collection Variable: {!collOverlaps}

    4. Direction: First item to last item

  7. Create a Formula Resource (Same process as item #2)

    1. forPartnerNames

      1. API Name: forPartnerNames2

      2. Data Type: Text

      3. Formula: {!Loop_Overlaps_Again.xbeamprod__Partner_Name__c} & ", "

  8. Add the following elements to the “For Each” path

      1. Label: Overlap Population Catch All

      2. API Name: Overlap_Population_Catch_All

      3. Outcome 1

        1. Label: Catch All

        2. Outcome API Name: Catch All

        3. Condition Requirements to Execute Outcome: Custom Condition Logic Is Met

        4. Condition Logic: NOT 1

        5. Condition 1

          1. Resource: {!varCapturedPartnerNames}

          2. Operator: Contains

          3. Value: {!Loop_Overlaps_Again.xbeamprod__Partner_Name__c}

        1. Label: Assign Partner Names Catch All

        2. API Name: Assign_Partner_Names_Catch_All

        3. Variable: {!varPartnerNamesCatchAll}

        4. Operator: Add

        5. Value: {!forPartnerNames2}​

  9. Add the following elements to the “After Last” path of the 2nd Loop

      1. Label: Update Account

      2. API Name: Update_Account

      3. How to Find Records to Update and Set Their Values: Specify conditions to identify records, and set fields individually

      4. Object: Account

      5. Condition Requirements to Update Records: All Conditions Are Met (AND)

      6. Condition 1

        1. Field: Id

        2. Operator: Equals

        3. Value: {!recordId.xbeamprod__Account__c}

      7. Set Field Values for the Account Records

        1. Field 1

          1. Field: Partners_Customer__c

          2. Value: {!forPartnerNamesCustomer}

        2. Field 2

          1. Field: Partners_Opportunity__c

          2. Value: {!forPartnerNamesOpportunity}

        3. Field 3

          1. Field: Partners_Prospect__c

          2. Value: {!forPartnerNamesProspect}

        4. Field 3

          1. Field: Partners_Catch_All__c

          2. Value: {!forPartnerNamesCatchAll}

        5. Repeat the previous step for any additional custom populations you are capturing

  10. Click on the “Update Account” element created in step 7 and select “Add Fault Path”

  11. 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.


  1. Navigate to Setup > Process Automation > Flows > “New Flow”

    1. Select “Record-Triggered Flow, then click “Create”

      1. Object = Crossbeam Overlap

      2. Trigger the Flow When: A record is created or updated

      3. Condition Requirements: All Conditions Are Met (AND)

        1. Field: xbeamprod__Account__c

        2. Operator: Is Null

        3. Value: {!$GlobalConstant.False}

      4. When to Run the Flow for Updated Records: Every time a record is updated and meets the condition requirements

      5. Optimize the Flow for: Actions and Related Records

    1. Referenced Flow: [Crossbeam Overlap] - Populate Partner Names

    2. Label: Populate Partner Names

    3. API Name: Populate_Partner_Names

    4. Set Input Values

      1. recordId

        1. Include = TRUE

        2. Resource = {!$Record}

      2. varRecordWasDeleted

        1. Include = TRUE

        2. Resource = {!$GlobalConstant.False}

  2. 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.


  1. Make sure you have the [Crossbeam Overlap] After Save still open

  2. Click “Save As” in the upper right hand corner

  3. Choose “A New Flow” (Do NOT Select “A New Version”)

    1. Flow Label: [Crossbeam Overlap] Deleted

    2. Flow API Name: Crossbeam_Overlap_Deleted

    1. Click on the Start Element and click “Edit”

      1. Set the option for “Trigger the Flow When:” to “A record is deleted”

    2. Click “Done”

    1. Click “Edit Element” on the “Populate Partner Names” Subflow

    2. Update the Value for “varRecordWasDeleted to {!$GlobalConstant.True}

  4. Save and Activate Flow

Did this answer your question?