Ask Search:
Nicole ZyvoloskiNicole Zyvoloski 

Opportunity Hierarchy, Parent-Child Opportunities

I'm testing out two ways of creating an Opportunity hierarchy.
1) Simple Lookup field on Opp to another Opp. Pro = ability to nest as many levels as needed. Con = difficulty rolling/summarizing data up the chain.
2) Parent Opportunity object (per this help article: https://help.salesforce.com/articleView?id=000004368&language=en_US&type=1 ). Pro = use DLRS to roll up desired data from child opportunity records. Con = appear limited to single-level relationship.

Use case: about 20% of our revenue comes from multiyear cooperative agreements with different government units. We often have multiple such agreements with one agency/account so account pipelines don't quite meet the need. We want a parent opportunity to house documents related to the authority to work together, store the total amount of the agreement, and rollup opportunity amounts as child opportunities are created (budgeted amounts) and then closed (booked amounts/receivables). For that, I'm finding success with option 2, Parent Opportunity object. However, we'd like to add another layer or two. Say we have a 3-year agreement worth $1.5M that specifies 0.5M must be spent each of the three years. We want to set up that 3-year as the Ultimate Parent. Then we want to create a $0.5M child for each year of the agreement. Then we want to nest the child opportunities (ranging from $10k-$250k) for each year under that. In some cases, there is a need for a fourth level as well. The challenge I'm running into is that I can either have one Parent Opportunity with many child Opportunities, just two levels, and great DLRS functionality OR I can have a limitless hierachy with Opportunities looking up to other Opportunities but am struggling to then achieve the desired ability to roll up budgeted and booked amounts.

Any advice about methods you've used to meet such a need? Any documentation you can point me toward?
Best Answer chosen by Nicole Zyvoloski
Amnon KruviAmnon Kruvi
Hi Nicole,.

I'm going to say something a bit outlandish here, it might be just what you need, or I may have completely misunderstood the issue:
Create an object called Opportunity Group.
Add a relation to opportunities so they can be related to a group (Opportunity Group)
Add a relationship from Opportunity Group to Opportunity Group (Parent Opportunity Group)
Using DLRS, create a summary field on opportunity group that sums the Amount of all child opportunities (Opportunity Value)
Using DLRS, create a summary field on opportunity group that sums the Value field of all child opportunity groups (Child Groups Value)
Create a formula field (Value) that performs Opportunity Value + Child Groups Value

All Answers

Amnon KruviAmnon Kruvi
Hi Nicole,.

I'm going to say something a bit outlandish here, it might be just what you need, or I may have completely misunderstood the issue:
Create an object called Opportunity Group.
Add a relation to opportunities so they can be related to a group (Opportunity Group)
Add a relationship from Opportunity Group to Opportunity Group (Parent Opportunity Group)
Using DLRS, create a summary field on opportunity group that sums the Amount of all child opportunities (Opportunity Value)
Using DLRS, create a summary field on opportunity group that sums the Value field of all child opportunity groups (Child Groups Value)
Create a formula field (Value) that performs Opportunity Value + Child Groups Value
This was selected as the best answer
Nicole ZyvoloskiNicole Zyvoloski
Thanks for the idea of adding a lookup from Opportunity Group to Opportunity Group, that gets me closer to our end goal! I've got the DLRS in place on the Opportunity Group object to sum the amounts/values of child Opportunities, but I'm still missing the ability to sum those same attributes for a group of Opportunity Groups that are linked via lookup. I'm going to keep playing around to see if I can get a formula field or DLRS to do what we're hoping.
Amnon KruviAmnon Kruvi
You'd still use DLRS to create that sum. Did I not mention that? 
Nicole ZyvoloskiNicole Zyvoloski
Adding the lookup from Opportunity Group to Opportunity Group has done the trick, thanks for the idea, Amnon! Then it just needed another set of DLRS fields to calculate the amounts/values at that level. This may be the right solution for us, but I'm going to explore two suggestions form other nonprofit users (looking at Contracts and Payments) as well.
Amnon KruviAmnon Kruvi
By all means - if you do find a better one, let me know so I know for next time! My experience doesn't revolve around nonprofits, but it's a topic I'd love to know better. 
Swati AroraSwati Arora
Hi Amnon,

Could you please explain a bit more in detail(if possible) for more better understanding as I am new to Salesforce and tryig to achieve this functionality.
This particular one : Add a relationship from Opportunity Group to Opportunity Group (Parent Opportunity Group).