Exodus Salesforce Docs
Reports and Dashboards

DLRS and Rollup Fields

How declarative lookup rollups, formulas, summary fields, and service-maintained totals work in reports

Many report fields in this project are not typed by a user. They are calculated from child records, formulas, scheduled jobs, Apex services, or DLRS.

Understanding that difference matters. If a user filters on the wrong rollup, the report can look correct but answer the wrong question.

What DLRS Means

DLRS means Declarative Lookup Rollup Summaries. It is a managed package/tooling pattern that keeps rollup fields on a parent record when the relationship is a lookup, not a Salesforce master-detail relationship.

Plain English:

Example: Sales Order Lines are child records of a Sales Order. A DLRS rule can count lines, sum line revenue, sum commission, or find the largest line revenue, then write the result onto the Sales Order.

Why Users See Rollup Fields

Reports are easier when users can filter or group on the parent record. A Sales Order report can show Total Commission Amount, Line Item Count, Total Units, or Negative Margin Lines without requiring every user to build a line-item report.

That convenience has a tradeoff: the report user must know what child records and criteria feed the field.

Rollup Types In This Project

TypeExampleWhat updates itReport behavior
FormulaAR Status, Order Gross Margin, BOM Cost Coverage %.Salesforce calculates from other fields on the same record.Good for labels and ratios.
Salesforce summary fieldTotal Order Revenue where metadata type is Summary.Native Salesforce rollup on a supported relationship.Good for parent totals.
DLRS rollupLine Item Count, Total Commission Amount, address order counts.DLRS custom metadata rules. Most active rules in this repo are realtime.Good for parent summaries; check child object and criteria.
Apex/service rollupPayment totals, fulfillment summary, Lead activity summaries.Domain services/triggers/schedulers.Good for operational state; check the owning service if stale.
SnapshotBilling/shipping address fields on orders and payment transactions.Copied when the record is created or workflow runs.Good for historical reporting.

How To Spot A Rollup Field

Field names often reveal the pattern.

Name patternUsually means
Total *, * Total, * AmountSum or calculated amount.
* CountCount of child records or related evidence.
Last *, Latest *, First *Max/min timestamp from related records or latest service state.
* Percent, * Ratio, * RateFormula derived from totals.
Has *, Is *Formula or service-maintained checkbox.
* Status, * Tag, * Rating, * TierDerived operational label.
Metrics *System/debug evidence for recalculated metrics.

Sales Order DLRS Fields

These Sales Order fields are backed by Sales Order Line rollups or line-derived summary logic. They are good for order-level reports, but use line reports when you need the exact item that caused the value.

Sales Order fieldChild sourceWhat it means
Line Item CountSales Order LinesCount of all custom sales-order lines.
Total UnitsSales Order LinesSum of line quantities.
Total Order CostSales Order LinesSum of total line cost.
Total Commission AmountSales Order LinesSum of line commission amounts.
Total Credits AmountSales Order Lines where credit item flag is trueSum of credit-line revenue. Usually negative.
Total Line Net MarginSales Order LinesSum of line net margin.
Total COGS VarianceSales Order LinesSum of line COGS variance.
BOM Lines CountSales Order Lines using BOM costCount of BOM-backed lines.
BOM Covered Line CountSales Order Lines with BOM-backed cost basisCount of cost-covered lines.
High Margin Items CountSales Order Lines in high-margin bucketCount of high-margin lines.
Low Margin Items CountSales Order Lines in low-margin bucketCount of low-margin lines.
Negative Margin LinesSales Order Lines with negative marginCount of loss-making lines.
Largest Line RevenueSales Order LinesRevenue from the largest single line.
Items At Max TierSales Order LinesCount of lines already at maximum commission tier.
Items With OpportunitySales Order LinesCount of lines with a commission-tier opportunity/nudge.
Lines With No Config CountSales Order LinesCount of lines missing commission/cost config.
Lines With Overrides CountSales Order LinesCount of lines with manual commission overrides.
Total Potential Additional CommissionSales Order LinesSum of possible additional commission from lines with tier opportunities.

Best practice: use these fields to find orders that need review. Use Cost Intelligence Sales Order Lines when you need item-level accountability.

Address Tracker DLRS Fields

Address Tracker records use DLRS to summarize order and quote behavior by bill-to and ship-to address.

Address field familyChild sourceWhat it answers
Bill To Order Count / Ship To Order CountSales OrdersHow often this address was used on orders.
Bill To Order Value / Ship To Order ValueSales OrdersTotal final order value for this address.
Ship To Order UnitsSales OrdersUnits shipped to this address.
Ship To Shipment CountSales OrdersShipment count for this ship-to address.
Last Bill To Order Date / Last Ship To Order DateSales OrdersMost recent order date for the address.
Last Ship To Delivery DateSales OrdersMost recent complete delivery timestamp.
Last Ship To Fulfillment SyncSales OrdersMost recent fulfillment sync date.
Bill To Quote Count / Ship To Quote CountQuotesQuote count by address.
Bill To Quoted Value / Ship To Quoted ValueQuotesQuoted value by address.
Converted Quote Count fieldsConverted QuotesQuotes tied to a converted order.

Best practice: use Address Tracker rollups for address-level questions, such as "which stores/ship-to locations generate the most value?" Do not use them to inspect individual order issues.

Account DLRS Fields

Account rollups summarize customer behavior across quotes, orders, credits, ownership transfer, and lifetime value.

Account field familyWhat it answers
Quote count/value fieldsHow much quoting activity exists for the customer.
Converted quote fieldsWhich quote value turned into orders.
Lifetime spendCustomer-level sales value.
Credit fieldsShipping, goodwill, pricing adjustment, damaged product, post-audit, and unclassified credit totals.
High/low margin order countsWhether the customer tends to produce good or weak margin.
Last quote/credit/ownership transfer dateRecency of activity.
Ownership transfer countHandoff volume.

Best practice: use Account rollups for customer portfolio reports. For individual order, item, or credit investigation, open the underlying records.

Quote Rollup Fields

Quotes use rollups from Quote Lines for approval, margin, and conversion readiness.

Quote field familyWhat it answers
Line Item CountNumber of quote lines.
Gross Amount, Total Credits Amount, COGS, Gross MarginQuote economics.
Total Commission Amount, Total Line Net MarginCommission and margin context before conversion.
BOM Line Count, Lines With No Config, Lines With OverridesSetup quality and cost confidence.
Items At Max Tier, Items With OpportunityCommission-tier opportunity.
Negative Margin Line CountApproval risk.

Best practice: use quote rollups for approval and pre-order profitability. Use quote line reports when you need item detail.

Item DLRS Fields

Items use rollups to summarize sales velocity, revenue, COGS, and open order demand.

Item field familyWhat it answers
Sales Last 7/30/90/365 DaysSales activity over rolling windows.
Units Last 7/30/90/365 DaysUnit velocity.
Revenue Last 30/90/365 DaysRevenue contribution.
Avg COGS Last 30/90 DaysRecent cost trend.
Open Orders CountCurrent demand/backlog context.
Allocated UnitsUnits already allocated.

Best practice: use Item rollups for inventory, purchasing, and item-performance dashboards. Use order-line reports when you need exact order/customer evidence.

Staleness And Trust

Most DLRS rules in this repo are configured as realtime. That means the rollup should update when child records change. Still, users should understand these caveats:

SymptomWhat to check
Parent total looks wrongOpen the child records and confirm the rollup criteria.
Count is different from a detail reportThe detail report may include records excluded by DLRS criteria.
Value is blankNo matching child records, missing child field values, or rollup not recalculated.
Field has old-looking dataCheck whether the field is a snapshot, service-maintained metric, or archived legacy rollup.
Payment total does not match order totalPayment totals come from payment objects, not line revenue.

Report Design Rules For Rollups

  1. Use rollup fields when the report question is about the parent record.
  2. Use child/detail reports when the question is about why the rollup has that value.
  3. Do not mix parent rollups and child rows without understanding row multiplication.
  4. Do not manually edit rollup fields.
  5. Treat archived legacy rollups as historical compatibility only.
  6. Add the owning child object and criteria to the report description when using a confusing rollup.
  7. If a dashboard uses a rollup, keep a drill-through report that shows the child records behind it.

Examples

User wants to knowUse thisDrill into this
Which orders have negative margin?Sales Order report with Has Negative Margin or Negative Margin Lines.Cost Intelligence Sales Order Lines.
Which ship-to addresses drive the most revenue?Address Tracker report with Ship To Order Value.Sales Orders filtered by Shipping Address Tracker.
Which accounts receive the most credits?Account report with credit rollup fields.Sales Orders/lines or credit report filtered by Account.
Which items are selling fastest?Item report with rolling sales/unit rollups.Sales Order Lines filtered by Item.
Which orders are missing commission setup?Sales Order report with Lines With No Config Count.Sales Order Lines or Cost Intelligence Sales Order Lines.

Last updated on

On this page