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:
Category → Source → Dictionary Metrics → Report → Template Mapping
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.
Paid Media, Commerce, Analytics/Attribution
2

Create Source

Table: source_masterAdd the platform under the category.
  • Set client_id = 0 for system/global sources
LinkedIn Ads → category_id = Paid Media
3

Add Metrics and Dimensions

Table: report_data_dictionaryInsert metrics (clicks, spend, impressions) and dimensions (account, campaign). For each entry define:
FieldDescription
source_tableDatabase table to pull from
source_columnColumn name in source table
entry_typeSet to System
levelAccount, Campaign, AdSet, Ads, Orders
attributeFor custom dimensions
This step defines what data exists.
4

Map Metrics to Source

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

Create Report

Table: report_masterInsert a new report record:
FieldValue
report_namee.g., “LinkedIn Ads”
report_typeSystem
This generates a report_id used in subsequent steps.
6

Map Report to Source

Table: report_source_masterLink the report to its data source:
report_id ↔ source_id
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:
RuleDetail
AggregationAlways aggregated (no granular drill-down)
GranularityAlways daily
Level behaviorVaries by source type (see below)

Level by Source Type

Source TypeLevel Used
Paid MediaAccount
Shopifynull
AnalyticsAnalytics Report
Mission Controlnull
Only top-level aggregated metrics should be added to report_template_master for system reports.