Strategic Reports
Access Prerequisites
- Permission (module):
admin(route guardAuthGuardServicewithdata.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:
adminmodule in the operator's role (dual permission — CPM enum on the backend + dynamic module in the DB). Withoutadmin, 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 thewasPaidfilter is configurable depending on the query.
Step by step
- Access the Dashboard → Strategic reports menu.
- The screen opens on the RFM tab; wait for the chart to load.
- Adjust the period (start/end date) of the analysis — the default for RFM is the last 365 days up to today.
- (Where available) choose the order types (
geral,crowdfunding) and the grouping (day/week/month/year). - 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".
| Tab | Endpoint (API-Gateway /v1/strategic-reports/...) | What it delivers | Filter parameters |
|---|---|---|---|
| RFM | rfm-analysis | Customer 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 Trends | sales-trends | Time series of sales with option to compare with the previous period. | from, to, groupBy (day/week/month/year), compareWithPreviousPeriod, orderTypes |
| Conversion Analysis | conversion-analysis | Conversion rate (e.g.: registration → first purchase; order → paid). | from, to, storeId, projectId, orderTypes |
| Product Performance | product-performance | Product ranking by revenue/quantity (limit for top-N). | from, to, storeId, orderTypes, limit, wasPaid |
| Store/Project Performance | store-project-performance | Comparison by store and by crowdfunding project. | from, to, orderTypes, wasPaid |
| Payment Method | payment-method-analysis | Revenue distribution by payment method. | from, to, storeId, orderTypes, wasPaid |
| Seasonality | seasonality-analysis | Seasonal patterns (peaks by month/day of the week). | from, to, storeId, projectId, orderTypes, wasPaid |
Filters and parameters
| Filter | What it is | System/backend effect |
|---|---|---|
Start / end date (from/to) | Analysis window | Sent 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 crowdfunding | Defines 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 period | Mirrors the interval backwards | When enabled in Trends, the backend calculates the immediately preceding interval of the same length for % variation. |
wasPaid | Consider only paid orders | Configurable in Product/Store/Payment/Seasonality; in RFM it is forced to true (only effectively paid purchases score). |
storeId / projectId | Restrict to a specific store/project | Filters 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:
- 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).
- 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".
- 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. - 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-sourceandcustomer-profileendpoints 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
BigNumberin 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
orderTypesfilter to be adjusted.