Opportunity Metrics Dashlet

Hi

We have a query regarding Opportunity Metrics Dashlet.

Please can you advise how Opportunity Metrics Dashlet works in respect to the fields that trigger the calculation, how it calculates the “Won”, “Lost”, and Active”, and any other process that run in the backend to populate the dashlet.

Kind Regards

David

  • Hi David Sillah,

    This is a dashlet defined in <root>/clients/base/views/opportunity-metrics directory.

    You can checkout the php metadata, js controller as well as .hbs file there.

    Also, if you read through the js controller, you can see that it triggers 'opportunity_stats' endpoint defined under <root>/modules/Accounts/clients/base/api/AccountsApi.php where it picks value from the opportunity sales stages - Closed Won and Closed Lost.

    If you want to modify this to pick up your own sales stages if not Closed Won and Closed Lost, you can extend this endpoint to provide your own values. You can even extend the view js controller to custom directory if needed for any customization.

    Please go through these files to understand more about it.

    Note: <root> means your sugar directory root.

    Regards.