Roll-up RLI Product Category Values to Opportunity Multiselect

We would like a field on our Opportunity record that reflects all of the Product Category values on related Revenue Line Items. For instance, for an Opportunity with 2 Revenue Line Items, if a "WP" Product Category was on 1 Revenue Line Item and "EC" was on the second Revenue Line Item, we would have a field on the Opportunity that reflects both "WP" and "EC" so that we can filter and report on "Opportunities with Product Category "WP", for instance. 

We like the idea of the "RollUp" SugarLogic formulas, but there isn't anything like this for these fields, so we were thinking maybe a SugarBPM process could do this for New Opportunities and whenever the RLI Product Category field was changed. 

Thanks...VO

  • I've got a few ideas about how to go about this, but can I ask, once this field is on the Opportunity, how will you use it?

    Specifically:

    • Is this to provide an obvious visual indicator when looking at an Opp record view, which product categories it contains?
    • Is this to filter Opps on a Listview/dashlet/report?
    • Will the field be used as part of any email templates?
    • Will the field be used as part of any integration point?

    And lastly... how many distinct product categories are there, and how often do they change?

  • What is the purpose on configuring in the Opportunity a custom multiselect whose options are the unique categories related to RLIs? Can you eplain, please?

    Through Reports you should be able to fetch all Categories related to RLIs related to a set of Opportunities, so what is the point?

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • We want to be able to filter and report on Opportunities based on Product Categories chosen in RLI? "Show me the Opportunities with "WP" category RLIs".

    Is this to provide an obvious visual indicator when looking at an Opp record view, which product categories it contains? Yes, that would be one use, plus the filtering that having it on a ListView would provide. 

    Is this to filter Opps on a Listview/dashlet/report? Yes. For reporting, we could do this by getting to the Opps from the RLI, but can't on a filter.

    Will the field be used as part of any email templates? Not sure, but possible.
    Will the field be used as part of any integration point? Not sure, but less possible. ;)

    Thanks for asking the clarifying questions. I'm interested to know who they influence potential solutions (so I can learn this analysis). VO

  • What is the purpose on configuring in the Opportunity a custom multiselect whose options are the unique categories related to RLIs? Can you eplain [SIC], please? We want to be able to filter Opportunities based on what Product Categories they have in them. 

    Through Reports you should be able to fetch all Categories related to RLIs related to a set of Opportunities, so what is the point? Having them available in List View filters is the point, I believe.

    Thanks for asking and helping! VO

  • Thank you for your answers, so the strategy solving that puzzle:

    • Create a dropdown list containing all the available Product Categories. Mind that you will need to update such dropdown list whenever changes are made on Categories module (update, create, delete). We have implemented some logic hooks which update a dropdown list as per changes on a specific module. This may be a good start point for you for maintanance.
    • Create a logic hook before_save on Opportunities which looks for all RLIs related to an Opportunity being created. Fetch the Category for each RLI and populate a custom multi select field accordingly (the one for which you created the Categories dropdown list).

    Good luck!

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Thank you, Andre! I haven't written or deployed a logic hook before, so I will need to get up to speed on that. 

    Is there a reason why SugarBPM is not used for these types of things that are initiated when records are created / editted? I see Logic Hooks brought up a lot more than SugarBPM among those that know the platform, so I'm wondering how decisions are made on what tools to use for customizations. Thanks for any insights. 

  • I always try using SugarBPM first so that it can be changed by a non-developer. But it does have some limitations and that is when I choose to use Logic Hooks. Sometimes, more complex SugarBPM processes can be more efficient when written as a Logic Hook but the changes require a developer.

  • SugarBPM is powerful and quite useful for common requests, but for some specific ones, like yours, can not be accomplished on once it is very specific one. In that case you need to surrender to logic hooks.

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Yes. And that is one option but in some cases like this one it is easier to create a Logic Hook than to extend SugarBPM.

1 2