Skip to content

Strategic Reports

Access Prerequisites

  • Permission (module): admin (route guard AuthGuardService with data.module = admin) — this is the most restricted intelligence report in the BackOffice.
  • License/Feature: None.
  • Menu container: GENERAL → Dashboard group

What it is / when to use

A set of commercial intelligence analytical reports (read-only) generated by the StrategicReportsService microservice. Unlike the Dashboard panels (which simply sum up what has already happened), this section contains derived calculations: customer RFM segmentation, sales trends with period comparison, conversion funnel, product/project performance, payment method mix, and seasonality. Use it for marketing, retention, and product prioritization decisions — not as an accounting statement.

The screen is a container with tabs (/strategic-reports). When opened, it automatically redirects to RFM (/strategic-reports/rfm-analysis). Each tab is a child route that triggers its own backend query; switching tabs reruns the query for that analysis.

Prerequisites

  • Permission: admin module in the operator's role (dual permission — CPM enum on the backend + dynamic module in the DB). Without admin, the route is blocked by the guard and the item does not appear in the menu.
  • License/Feature: None.
  • Dependencies on other screens: the reports consume the order aggregator of StrategicReportsService, which crosses general orders (token/NFT purchases) and crowdfunding orders. Only paid orders (wasPaid = true) are included in RFM; for other analyses the wasPaid filter is configurable depending on the query.

Step by step

  1. Access the Dashboard → Strategic reports menu.
  2. The screen opens on the RFM tab; wait for the chart to load.
  3. Adjust the period (start/end date) of the analysis — the default for RFM is the last 365 days up to today.
  4. (Where available) choose the order types (geral, crowdfunding) and the grouping (day/week/month/year).
  5. Switch tabs to generate another analysis — each tab queries its own endpoint.

Tabs (available reports)

The tab bar exposes seven reports. There are two additional endpoints defined in the code (Registration Source and Customer Profile) that have not yet been implemented on the backend and do not appear as tabs — see "Business rules".

TabEndpoint (API-Gateway /v1/strategic-reports/...)What it deliversFilter parameters
RFMrfm-analysisCustomer segmentation by Recency, Frequency, and Monetary value. Distributes the base into segments (Champions, Loyal, At Risk, Hibernating, Lost, etc.) with count, % and revenue per segment.from, to, orderTypes
Sales Trendssales-trendsTime series of sales with option to compare with the previous period.from, to, groupBy (day/week/month/year), compareWithPreviousPeriod, orderTypes
Conversion Analysisconversion-analysisConversion rate (e.g.: registration → first purchase; order → paid).from, to, storeId, projectId, orderTypes
Product Performanceproduct-performanceProduct ranking by revenue/quantity (limit for top-N).from, to, storeId, orderTypes, limit, wasPaid
Store/Project Performancestore-project-performanceComparison by store and by crowdfunding project.from, to, orderTypes, wasPaid
Payment Methodpayment-method-analysisRevenue distribution by payment method.from, to, storeId, orderTypes, wasPaid
Seasonalityseasonality-analysisSeasonal patterns (peaks by month/day of the week).from, to, storeId, projectId, orderTypes, wasPaid

Filters and parameters

FilterWhat it isSystem/backend effect
Start / end date (from/to)Analysis windowSent in ISO format to the endpoint; limits the set of aggregated orders. In RFM, to is also the "now" used to calculate recency (days since last purchase).
Order types (orderTypes)geral and/or crowdfundingDefines which order flows are included in the cross-reference. all is normalized to general. RFM separates count/value by type (generalOrders* vs crowdfundingOrders*).
Grouping (groupBy)Granularity of the series (Trends/Origin only)Groups the series by day, week, month, or year.
Compare with previous periodMirrors the interval backwardsWhen enabled in Trends, the backend calculates the immediately preceding interval of the same length for % variation.
wasPaidConsider only paid ordersConfigurable in Product/Store/Payment/Seasonality; in RFM it is forced to true (only effectively paid purchases score).
storeId / projectIdRestrict to a specific store/projectFilters the aggregation to that store or crowdfunding project.

How RFM classifies customers

RFM is the most elaborate report and the only one set as the initial tab. Understanding the logic prevents misreadings:

  1. For each customer with paid orders in the period, the aggregator calculates Recency (days since last purchase), Frequency (number of purchases), and Monetary (total spent).
  2. Each metric receives a score from 1 to 5 based on percentiles of the base (p20/p40/p60/p80). Recency is "lower is better"; frequency and value are "higher is better".
  3. The combination of the three scores defines the segment (cascading rules on the backend): for example, R≥4 F≥4 M≥4 = Champions; R≤2 F≥3 M≤2 = At Risk; and whatever does not match any rule falls into Lost.
  4. The report returns, per segment, count, percentage, and total/average revenue, as well as the dominant segment and R/F/M averages for the base.

Scores are relative to the base, not absolute

The RFM score is calculated by percentiles of the period's population, not by fixed ranges. This means that "being a Champion" depends on how the customer compares to others in the same slice. Changing the period or the orderTypes reclassifies everyone. Do not compare segments between two different slices as if they were stable categories.

Business rules / caveats

Attention

  • Registration Source and Customer Profile are not implemented. The registration-source and customer-profile endpoints exist in the Angular service and in the backend handler, but the handler returns "report not yet implemented" (failure). They do not appear in the tab bar. Do not document/promise these two reports to end users until they are delivered.
  • Error ≠ zero. Each tab shows a loading state (loading) and, on failure, plots nothing (RFM zeros out the charts). An empty chart may indicate a period with no data or unavailability of StrategicReportsService — do not read it as "zero sales".
  • Wide default period. RFM opens with 365 days; on large databases the aggregation may take a few seconds. Other reports use the period you define.
  • Read-only. No tab writes data; they are derived reports. For official reconciliation use Accounting and the Ledgers.
  • Financial values: revenue totals are calculated on real monetary values (treated as BigNumber in the aggregation) — treat the numbers as analytical indicators without rounding when reading.
  • Data scope: the aggregation crosses general + crowdfunding orders; an analysis that ignores one of the types requires the orderTypes filter to be adjusted.