Marketing · Activity report & PDF

Read-only closure report for a finished activity: KPI achievement against goals, estimated vs final cost with an over/under-budget verdict, participating stores, activity actions, supplier costs and ratings — exportable as a PDF.

AreaMarketing
Routesmarketing.campaigns.show
Centre modulesmarketing
Staff levelsroot · admin · manager · crmmanager · weboperator · content_creator · owner
Modelscampaign · campaign-action · campaign-goal · supplier · supplier-rating
UI labelcampaign-report.estimated-cost / marketing.campaign.rating
Coverage4 use cases · 1 happy · 4 failure

How it works

Only reachable once the activity’s status is finished (campaign.canShow). campaign-stats supplies the measured KPI values; campaignGoalsColumns pairs each KPI with its goal and current value to produce an achievement figure. The cost verdict is a single derived label: campaign-report.final-cost-in-estimated (‘Within budget’) or campaign-report.final-cost-over-estimated (‘Over budget’). Store lists collapse to campaign-report.all-shops or campaign-report.more-shops (’+ {shops} stores’). createPDF renders the report for distribution. hiddenKPIs lets a centre suppress KPIs that do not apply, and referredComparison / lastYearPeriod support like-for-like comparison against the reference period. Activity actions are drawn on a Gantt timeline (nf-gantt) spanning the activity’s start and end dates, and the section is hidden when there are no actions.

Use cases

Why someone opens this (4)

  • Reporting a completed activity’s results and ROI to the centre’s owners.
  • Comparing performance against the same period last year.
  • Reconciling supplier invoices against the activity’s estimated budget.
  • Rating suppliers after an event so future activities can pick better partners.

Path map

flowchart LR
    F(["Activity report and PDF"]):::feat
    F --> H1["Report produced and exported"]:::ok
    F -.-> X1["Activity not finished"]:::bad
    F -.-> X2["No goals defined"]:::bad
    F -.-> X3["Stats unavailable"]:::bad
    F -.-> X4["Rating missing"]:::bad
    classDef feat fill:#b0432c,stroke:#b0432c,color:#ffffff,font-weight:bold
    classDef ok fill:#e3f1ea,stroke:#0d6b42,color:#0d4a2e
    classDef bad fill:#f7e6e2,stroke:#9a2d1c,color:#6e1f13

Happy paths

Report produced and exported

  1. User opens a finished activity’s report.
  2. campaign-stats resolves the measured KPIs and each goal shows its achievement.
  3. Costs are totalled and compared to the estimate, yielding the within/over-budget verdict.
  4. createPDF generates the PDF and the user shares it.

Failure paths

QA checklist

Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.

  • ✅ Report produced and exported
  • ⛔ Activity not finished
  • ⛔ No goals defined
  • ⛔ Stats unavailable
  • ⛔ Rating missing

Implementation


Generated from doc/feature-inventory.json · id marketing-campaign-report · commit 276788ca6