Zum Hauptinhalt springen

Reporting Service

The Reporting Service (/reporting/) provides read-only analytical views for promotion performance, budget utilization, coupon analytics, and A/B test results.

Overview

PropertyValue
Base Path/reporting/
ProtocolOData V4
OperationsRead-only (GET only)
AuthAdmin, PromotionManager, or BudgetManager role
CSV ExportSupported via exportCsv action

Report Entities

PromotionPerformance

Aggregated promotion KPIs from calculation logs.

GET /reporting/PromotionPerformance
GET /reporting/PromotionPerformance(<promotionId>)
FieldTypeDescription
promotionIdUUIDPromotion identifier
promotionNameStringPromotion name
promotionStatusStringCurrent status
promotionTypeStringPromotion type
applicationsCountIntegerNumber of times applied
totalDiscountGivenDecimalTotal discount amount
avgDiscountPerTxDecimalAverage discount per transaction
firstAppliedAtDateTimeFirst application timestamp
lastAppliedAtDateTimeLast application timestamp

StakeholderCostBreakdown

Cost share attributed to each stakeholder per budget.

GET /reporting/StakeholderCostBreakdown
FieldTypeDescription
stakeholderIdUUIDStakeholder identifier
budgetIdUUIDBudget identifier
stakeholderNameStringStakeholder name
stakeholderTypeStringStakeholder type
budgetNameStringBudget name
sharePercentageDecimalCost share percentage
totalBudgetCostDecimalTotal budget cost
stakeholderCostDecimalStakeholder's cost portion
contributionsTotalDecimalTotal contributions made
netBalanceDecimalNet balance
linkedPromotionsStringAssociated promotions

BudgetUtilization

Consumption vs total for each budget with burn rate projections.

GET /reporting/BudgetUtilization
GET /reporting/BudgetUtilization(<budgetId>)
FieldTypeDescription
budgetIdUUIDBudget identifier
budgetNameStringBudget name
statusStringBudget status
totalAmountDecimalTotal budget amount
consumedAmountDecimalAmount consumed
remainingAmountDecimalAmount remaining
currencyStringCurrency code
utilizationPctDecimalUtilization percentage
dailyBurnRateDecimalAverage daily consumption
projectedExhaustionDateTimeProjected exhaustion date
transactionCountIntegerNumber of transactions
linkedPromotionsIntegerNumber of linked promotions

CouponAnalytics

Per-coupon-type analytics.

GET /reporting/CouponAnalytics
GET /reporting/CouponAnalytics(<couponTypeId>)
FieldTypeDescription
couponTypeIdUUIDCoupon type identifier
couponTypeNameStringCoupon type name
totalIssuedIntegerTotal codes issued
totalActiveIntegerCurrently active codes
totalReservedIntegerCurrently reserved codes
totalRedeemedIntegerTotal redeemed codes
totalExpiredIntegerExpired codes
totalCancelledIntegerCancelled codes
redemptionRateDecimalRedemption rate percentage

ABTestResults

Compares control and experiment groups for A/B test promotions across two metrics, each with its own significance test:

  • Revenue per basket (headline metric, owner decision 2026-06-12) — average basket value, uplift, and a Welch t-test (revenueTStatistic, revenuePValue, revenueIsSignificant).
  • Conversion rate (secondary context) — control vs experiment conversion rate, uplift, and a chi-squared test (chiSquared, pValue, isSignificant).
GET /reporting/ABTestResults
GET /reporting/ABTestResults(<promotionId>)
FieldTypeDescription
promotionIdUUIDPromotion identifier
promotionNameStringPromotion name
controlAvgBasketDecimalControl group average revenue per basket
experimentAvgBasketDecimalExperiment group average revenue per basket
revenueUpliftDecimalRevenue-per-basket uplift (experiment vs control) — headline metric
revenueTStatisticDecimalWelch t-test statistic for the revenue-per-basket difference
revenuePValueDecimalWelch t-test p-value for revenue per basket
revenueIsSignificantBooleanWhether the revenue-per-basket uplift is statistically significant (Welch t-test)
controlConversionRateDecimalControl group conversion rate
experimentConversionRateDecimalExperiment group conversion rate
upliftDecimalConversion-rate uplift (experiment vs control)
chiSquaredDecimalChi-squared statistic for the conversion-rate difference
pValueDecimalChi-squared p-value for conversion rate
isSignificantBooleanWhether the conversion-rate uplift is statistically significant (chi-squared)

Detail Chart Entities

Pre-aggregated data for promotion performance charts:

EntityDescription
PromotionUsageByDayDaily application counts and discounts
PromotionUsageByHourHourly application counts
PromotionUsageByDayOfWeekDay-of-week application patterns
PromotionDiscountDistributionDiscount amount distribution buckets
PromotionTopPosGroupsTop-performing POS groups per promotion
PromotionTopArticlesTop articles per promotion

Killer-Feature ROI Entities

The service exposes per-feature ROI projections (emission count vs conversion count) backing the Killer Feature ROI dashboard.

EntityFeature
ThresholdGapROIThreshold-gap nudge
NearMissROINear-miss
SavingsSummaryROISavings summary
ProgressiveNudgesROIProgressive nudges
ABTestROIA/B testing
AggregatorRunsKFROI aggregator run log (read-only)

Per-feature daily aggregates are also queryable as first-class OData entities: DailyThresholdGapAggregates, DailyNearMissAggregates, DailySavingsSummaryAggregates, DailyNudgesAggregates, DailyABTestAggregates, DailyFreeItemAggregates.

GET /reporting/ThresholdGapROI
GET /reporting/AggregatorRuns
GET /reporting/DailyThresholdGapAggregates

Post-Mortem Analytics

Curated KPI projections surfaced after a promotion ends — they drive the post-mortem dashboards the user guide Phase 5 relies on.

EntityDescription
PromotionUpliftAnalysisIn-promo daily revenue minus a baseline (uplift absolute + percentage)
PromotionPostMortemTopStoresTop 10 POS groups by total discount
PromotionPostMortemTopArticlesTop 10 articles by total discount
PromotionHourOfDayHour-of-day x day-of-week heatmap (168 buckets)
PromotionAbComparisonA/B comparison (one row for A/B promotions, else empty)
PilotComparisonReportsPilot vs control comparison report (revenue, basket size, tx count)
GET /reporting/PromotionUpliftAnalysis(<promotionId>)
GET /reporting/PromotionPostMortemTopStores?$filter=promotion_ID eq <promotionId>

Audit Trail

Read-only access to transaction calculation logs:

GET /reporting/CalculationLogs
GET /reporting/CalculationLogs(<ID>)
GET /reporting/CalculationLogs(<ID>)/items
GET /reporting/CalculationLogs(<ID>)/promotions

CSV Export

POST /reporting/exportCsv

Request:

{
"reportType": "promotionPerformance",
"dateFrom": "2026-01-01T00:00:00Z",
"dateTo": "2026-03-31T23:59:59Z",
"promotionId": "uuid (optional)",
"stakeholderId": "uuid (optional)"
}

Supported reportType values: promotionPerformance, stakeholderCost, budgetUtilization, couponAnalytics, abTestResults

Response:

{
"filename": "promotion-performance.csv",
"contentType": "text/csv",
"data": "promotionId,promotionName,..."
}

The filename is fixed per report type (kebab-case, no date suffix): promotion-performance.csv, stakeholder-cost.csv, budget-utilization.csv, coupon-analytics.csv, ab-test-results.csv.

Authorization

RoleAccess
AdminFull read access to all reports
PromotionManagerRead access to all reports
BudgetManagerRead access to all reports