Report Writing Guide
How to build useful Salesforce reports with the right object, fields, filters, groupings, and totals
Good reports answer one business question clearly. Bad reports usually mix several questions, pick fields that look similar but mean different things, or summarize detail records at the wrong level.
Use this guide before creating or changing a Salesforce report.
Start With The Question
Write the question first, then pick the object and fields.
| Question | Usually start with | Why |
|---|---|---|
| How much did we sell? | Sales_Order__c | Order-level submitted/booked sales, customer, rep, payment, fulfillment, and margin context. |
| What products sold? | Sales_Order_Line__c or Cost Intelligence Sales Order Lines | Product/SKU-level quantity, revenue, cost, margin, and commission. |
| Who still owes money? | Sales_Order__c, Invoice__c, or payment reports | AR and payment status live on orders/invoices/payment objects. |
| Which orders are not fulfilled? | Sales_Order__c plus 3PL reports | Fulfillment status, sync status, tracking coverage, and provider evidence live on orders and fulfillment objects. |
| Which payment attempts failed? | Payment_Transaction__c | Attempt/result/gateway data is transaction-level. |
| Which reps are performing? | Sales Performance reports | Uses order totals, collected totals, rep, order date, and payment state. |
| Which leads need follow-up? | Lead or Task reports | Lead activity quality and follow-up discipline are Task-driven. |
| Which addresses are most valuable? | Address_Tracker__c | Address-level totals and latest dates are DLRS rollups from orders and quotes. |
Pick The Right Grain
The most common reporting mistake is using an order header when the question is about line items, or using line items when the question is about orders.
| Grain | Use it for | Avoid it when |
|---|---|---|
| Order header | One row per Sales Order: revenue, customer, rep, payment status, fulfillment status, order-level margin. | You need SKU, item group, quantity by item, line margin, or component cost. |
| Order line | One row per item/credit/shipping line: SKU, quantity, line revenue, line cost, line commission. | You need a count of orders. Line reports can count the same order multiple times. |
| Payment transaction | One row per processor/payment action: charge, refund, void, failure, settlement, gateway. | You need submitted sales or product performance. |
| Task | One row per sales activity: call, follow-up, next step, buyer signal. | You need customer revenue or AR totals. |
| Address Tracker | One row per reusable address: bill-to/ship-to counts, order values, quote values, latest delivery. | You need individual order detail. |
Field Types Users Should Recognize
| Field type | What it means | Report guidance |
|---|---|---|
| User-entered field | A user or import set it directly. | Good for filters when the process reliably maintains it. |
| Lookup field | Points to another record, such as Account, Contact, Quote, Warehouse, or Item. | Use for grouping, ownership, drill-down, and context. |
| Formula field | Calculated instantly from other fields on the same record. | Good for readable labels and ratios. Do not manually edit. |
| Summary field | Salesforce master-detail rollup summary. | Good for parent totals when the relationship is master-detail. |
| DLRS field | Declarative Lookup Rollup Summary from child records over a lookup relationship. | Good for parent totals, counts, and latest dates. Understand the child object and criteria before filtering on it. |
| Service-maintained field | Apex or scheduled jobs update it. | Good for operational reports, but check the owning process if it looks stale. |
| Snapshot field | Copied at the time of order/payment/invoice creation. | Good for historical reporting. Do not treat it as current Account or Address state. |
| External source field | Migration/integration lineage. | Use for reconciliation, not business filtering unless the report is about migration/source data. |
How To Choose Filters
Use filters that match the workflow.
| Goal | Good filters | Risky filters |
|---|---|---|
| Current submitted sales | Order Date, Status, Primary Sales Rep, order amount fields. | Created Date if orders were imported or backfilled. |
| Collected sales | Total Collected Amount greater than 0, Payment Status = Paid, Latest Payment Transaction At. | Final Total alone. It is not proof of collection. |
| Open AR | Balance Due Amount greater than 0, AR Status, Payment Due Date, Days Overdue. | Payment Status alone when partial payments matter. |
| Fulfillment exceptions | Sync To Fulfillment = true, Fulfillment Sync Status, 3PL Order Sync Tag, Has Tracking, Remaining Shipments. | Status = Closed alone. Closed orders can still need tracking/3PL review. |
| Sales activity quality | Lead Activity Quality Status, Task Type, Call Disposition, Follow Up Due Date. | Subject contains text. Subjects are inconsistent. |
| Product margin | Line-level cost/margin fields. | Order-level margin if you need SKU-level detail. |
Grouping And Summaries
Start with one primary grouping. Add a second grouping only when it changes the decision someone will make.
| Report question | Good grouping | Good summary |
|---|---|---|
| Sales by rep | Primary Sales Rep | Sum Final Total, sum Total Collected Amount, average Order Gross Margin %. |
| AR by customer | Account, then AR Status | Sum Balance Due Amount, max Days Overdue. |
| Fulfillment health | Fulfillment Sync Status, then Warehouse | Count orders, sum Remaining Shipments, max Fulfillment Last Attempt. |
| Payment failures | Gateway, Status, Transaction Action | Count transactions, sum Processed Amount. |
| Product profitability | Item, Item Group, or product type on line reports | Sum line revenue, sum line cost, average margin percent. |
| Lead follow-up | Owner, Lead Activity Compliance Status, due date | Count leads/tasks. |
Fields That Look Similar
| Field | Use it for | Do not confuse with |
|---|---|---|
Status | Broad operational order state, such as Closed. | Stage, which is legacy/source-stage context. |
Payment Status | Payment summary derived from payment work. | AR Status, which is receivables/open-balance logic. |
Final Total | Final customer-facing order total. | Total Collected Amount, which is cash collected. |
Total Order Revenue | Booked line revenue before some order-level formulas. | Final Total, which is final customer-facing order amount behavior. |
Balance Due Amount | Amount still owed. | Gross Amount or Final Total. |
Fulfillment Status | Operational fulfillment label. | Fulfillment Sync Status or 3PL Runtime Sync Status. |
Has Tracking | At least one tracking/shipment record exists. | Fulfillment Status = Fulfilled. A provider can fulfill before all tracking evidence is refreshed. |
Customer Email Status | Last customer-email attempt status. | Individual sent checkboxes for invoice, payment link, receipt, or tracking email. |
External RMA Count | Count of external RMA evidence linked to the order. | A native Salesforce RMA workflow. Salesforce is only a correlation surface for external RMAs. |
Report Builder Checklist
- Name the business question.
- Choose the object/grain.
- Add only columns needed to answer the question or act on the record.
- Add filters that match the lifecycle state.
- Group by one or two decision-making dimensions.
- Use summaries for currency/number fields and record counts.
- Check a few records manually to confirm the fields mean what you think.
- Save the report in the right shared folder.
- Add a short description explaining when to use the report.
- Do not create a private copy of a shared operational report unless it is personal scratch work.
Common Report Patterns
| Pattern | Base | Columns | Filters |
|---|---|---|---|
| Open AR follow-up | Sales Orders | Sales Order Number, Account, Primary Sales Rep, Payment Status, AR Status, Payment Due Date, Days Overdue, Balance Due Amount, Total Collected Amount. | Balance Due Amount > 0, not canceled/deleted, date range as needed. |
| Paid and fulfilled orders | Sales Orders | Sales Order Number, Account, Order Date, Final Total, Total Collected Amount, Fulfillment Status, Tracking Count, All Items Delivered At. | Payment Status = Paid, Fulfillment Status = Fulfilled. |
| Missing tracking | Sales Orders | Sales Order Number, Account, Warehouse, Fulfillment Sync Status, 3PL Order Sync Tag, Has Tracking, Tracking Count, First Tracking Received At. | Sync To Fulfillment = true, Has Tracking = false. |
| Margin review | Sales Orders or Sales Order Lines | Revenue, cost, gross margin, net margin after commission, negative margin fields, profitability tier. | Use line-level report when the question is product/SKU-level. |
| Rep performance | Sales Orders | Primary Sales Rep, Order Date, Final Total, Total Collected Amount, Total Commission Amount, Payment Status. | Date range by Order Date; exclude test/canceled records. |
| Lead activity quality | Tasks/Leads | Owner, Task Type, Call Disposition, Lead Activity Quality Status, Next Step, Follow-up Due Date. | Open leads or current activity date range. |
When To Ask For Help
Ask an admin or report owner before building a new report when:
| Situation | Why |
|---|---|
| You need a new field. | The field needs owner, entry surface, permissions, and dashboard purpose. |
| You want to change status or payment filters. | These fields drive operational dashboards. |
| The report uses DLRS or rollup fields you do not understand. | Parent rollups can hide child-record detail and criteria. |
| The report is for finance, commissions, or fulfillment SLA. | Wrong grain or stale fields can cause real operational mistakes. |
| You need production/export data. | Some fields contain customer, payment, or operational evidence that should not be shared casually. |
Last updated on