Our schema when we migrated from the previous CRM to Salesforce was an absolute nightmare. Once we moved to SF, I was granted the role as our SF admin. After building our integration to our website, I thought I had grown to be very familiar with most of our data. There is a specific permission that I need to grant on the website based on a pretty awful series of rollups that need to happen, but I'm struggling to get everything to work correctly. I'll try to properly map out the chain of events that need to be followed. I am using DLRS to do what I can.
The primary objects that need to be focused on are as follows (mostly custom objects): Account, License Servers, License Sites, License Products, License Content
License Product contains the determining value
License Content has a lookup to License Product and License Server
Account has a lookup to License Server but none of the others.
License Sites has a lookup to up to 2 different accounts ( main and secondary locations), but none of the others.
1) If License Content is associated with a License Product that contains a specific value, and the License Content expiration date is not past, then the value is equal to the amount of license seats exist in License Content.
2) If the License Content has this value > 0, then License Server sees this value as available seats for this desired License.
3) If License Server shows a positive number of active seats, then the Account will know that it has X amount of seats.
This is where it gets weird, because Account needs to reflect the total of available seats for both the License Site where it is the main location AND ALL of the License Sites where it is a secondary location.
So to add to the previous steps, Account needs to show a value equal to the number of seats from the site where it is the main location, PLUS all of the sites where it is the secondary location.
Currently, what I have in place is as follows:
1) License_Content__c has a formula field to show active seats of the designated license if it has not expired. (WORKS)
2) License_Server__c has a Number field where DLRS looks uses a lookup relationship From License_Server__c to License_Content__c where the lookup ID = the License_Server__c record. (WORKS)
3) Account needs to reflect the number of seats where it is a main location. I have a DLRS rollup where the Parent is Account, the Child is License_Server__c and the relationship field is the ID of the Account. The field to aggregate is the correctly populated field from step 2 (DOES NOT WORK - BLANK)
4) License_Sites__c needs to do its own separate rollup where each License_Site__c record reflects the number of active seats in its secondary location, so Accounts step 3 needs to function for this to work
5) Account now needs a rollup that contains the total number of license seats where it is a secondary location in License_Sites__c.
This structure is horrible, but it has been in place for years and years, and I don't think there is any way we can consolidate and normalize. I've been working on this problem for far too long, and I'm still running into issues with step 3, even though the correct values are in place and it just seems like the DLRS summary is not filling any values in. This whole thing is super overwhelming because of how massively confusing it is, so there might be a really easy way to take care of this that I'm not seeing.
Is there a simpler way to handle this? Or do I need to change the way I am using these DLRS rollups? Please let me know if any clarity is needed on the process that should be followed.