Skip to main content

Overview

System-defined reports are fully configuration-driven — no backend code changes required. A new report is created entirely by inserting records into the appropriate tables. The reporting engine flow:
If these mappings exist correctly, the report automatically works.

Step-by-Step Process

1

Create Category

Table: category_masterAdd a logical grouping for the platform if one doesn’t exist.
2

Create Source

Table: source_masterAdd the platform under the category.
  • Set client_id = 0 for system/global sources
3

Add Metrics and Dimensions

Table: report_data_dictionaryInsert metrics (clicks, spend, impressions) and dimensions (account, campaign). For each entry define:This step defines what data exists.
4

Map Metrics to Source

Table: report_custom_fieldsCreate the mapping between dictionary entries and sources:
This ensures only valid metrics appear for that source and enables safe query generation.
5

Create Report

Table: report_masterInsert a new report record:This generates a report_id used in subsequent steps.
6

Map Report to Source

Table: report_source_masterLink the report to its data source:
This tells the engine which data sources feed this report.
7

Configure Columns (Template)

Table: report_template_masterDefine how the report appears in the UI:
  • Which metrics appear
  • Display order
  • Column labels
  • Sticky columns
  • Formula overrides (if needed)
For system reports, only add Account-level metrics. Do not add Campaign, AdSet, or Ads level metrics — Account level already contains aggregated totals.

System Report Constraints

System-defined reports follow these rules:

Level by Source Type

Only top-level aggregated metrics should be added to report_template_master for system reports.