Skip to content
Example

Example

Example: Measuring Daily Lead Creation

Below is an example of creating a metric to measure how many Lead records are created daily in your Salesforce org.

  1. Navigate to Breezz SetupMetricsNew.

CountSOQLQuery Example

  1. Configure the metric with the following values:

    • Metrics Calculation Type: Count SOQL Query
    • Execution Interval: 12 hours
    • Metrics Calculator Class Name: forvendi.Metrics.CountQueryMetricsCalculator
    • Group Name: Lead Monitoring
    • SOQL Query:
      SELECT COUNT() FROM Lead WHERE CreatedDate = TODAY
  2. Click Save.

You can verify that the metric is properly registered and deployed by searching for its API Name or filtering by the calculation type in the Metrics dashboard.

Metrics Filter

💡 Apex API Reference: If you are looking for technical class signatures and data structures (Metric and MetricInfo), visit the Breezz APEX API - Metrics Reference.