function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vikas Kumar 135Vikas Kumar 135 

Opportunity Split data into Opportunity

Hi Friends,

Is it possible to get the Opportunity split data from a custom Opportunity split object into Opportunity object? I just need the rep name and the %split.

For example: If there are 2 reps,  rep1 with a 50% split and rep2 with a 50% split. I want to get this data in four fields in Opportunity
Opportunity Field:
rep1 Name: rep1 from Opportunity Split
rep1 %:  50%  from Opportunity Split
rep2 Name: rep2 from Opportunity Split
rep2 %:  50%  from Opportunity Split

Any help will be appreciated.

Regards,
Vikas

 
wvutriwvutri
I know this is a bit late, but I was searching how to do this myself and came across your post. I finally figured it out a week or two later, so I wanted to pass along how I did it! 

One thing to note: I didn't do this for "rep1" I only did it for the secondary owner, "rep2". So when I talk about Rep1 below, I'm making a guess that it'll work based on how it works for Rep2. 
I'm also listing the API names of the fields, yours might vary. 

Fields to create on the Opportunity Record: 
  • Primary Owner (rep1) - text field
  • Primary Owner Percentage - % field
  • Secondary Owner (rep2) - text field
  • Secondary Owner Percentage - % field

You'll want to make a Flow: 
Record-Triggered Flow
- Trigger: A record is Created or updated
- Run Flow: After the record has been saved
- Object: Opportunity Split

We Start the flow with a Decision
  • Title: Rep Update
  • Decision 1: Rep1
    • Conditions below: All Conditions Are Met (AND)
    • Record.SplitAmount - Does Not Equal - Record__Prior.SplitAmount (this checks to see if it has been updated, i.e. from 100 to any other value)
    • Record.SplitOwnerID - Equals - Record.OpportunityID
  • Decision 2: Rep 2
    • Conditions below: All Conditions Are Met (AND)
    • Record.SplitAmount - Does Not Equal - Record__Prior.SplitAmount 
    • Record.SplitOwnerID - Does Not Equal - Record.OpportunityID (we have opportunity ID on the Opportunity Split record, if you don't, then do a lookup so it'll look more like "Record.Opportunity > OpportunityID") 
  • Default Outcome: no action needed here, it's for if the above doesn't match anything. 
Default Outcome goes to an Assignment - you don't have to do this but I've learned to so you can track everything to an end point. 
  • Title: DONE
  • Variable: Create a new variable/resource labeled "v_DONE"
    • Boolean value with the Default being True. 
  • v_DONE - Equals - True
  • All this does is tell you the flow is done. 

Decision 1 should branch to a Get Records 
  • Title: Opportunity GET
  • Object: Opportunity
  • Filter conditions: All Conditions are Met (AND)
    • ID - Equals - Record.OpportunityID
  • Sort Order: Not Sorted
  • How Many Records to Store: Only the First Record
  • How to Store Record Data: Automatically store all fields
Now we go from this Get Record to an Update Records
  • Title: Update Opportunity Fields
  • How to Find Records to Update and Set Their Values: Specify conditions to identify records, and set fields individually
  • Object: Opportunity
  • Filter: All Conditions are Met (AND)
    • ID - Equals - Record.OpportunityID
  • Set Field Values for the Opportunity Record: 
    • "Field" <-- "Value"
    • Primary Owner <-- Record.OwnerID 
    • Primary Owner Percentage <-- Record.SplitPercentage
After Update Records we drag the arrow over to the Assignment: DONE. 
That's all for Decision 1. Now you'll pretty much rinse/repeat for Decision 2. 

Decision 2 differences: 
  • Update Records
    • You'll use the Secondary Owner fields instead of Primary Owner Fields
Now activate it and test it out!