Related
Similar by tag
- B-QiSuiteTM-Overview
- C-Scope-of-Services
- E-What-I-DON-T-Do
- F-What-I-Expect-From-You
- G-KPIs-Goals
- A-Investment-and-Payment-Terms
- A-Investment-Payment-Terms
- B-ROI-and-Payment-Projection-Example
- B-ROI-Payment-Projection-Example
- .
Data flow
- Source of truth: Admin form or Google Sheet → synced to D1.monthly_inputs.
- Compute: Pages Function
/api/schedulecalculates monthly capped variable and weekly due. - Annual cap: if sum of monthly variables in a calendar year exceeds 25% of GP, apply a proportional scale factor.
- History: store snapshots in
schedule_history. - Quartz page: simple script fetches
/api/scheduleand renders.
API
GET /api/schedule→{ months: [...] }with fields per period: revenue, gp, kpi, capped variable, weekly due, etc.GET /api/monthly/GET /api/trueup?quarter=YYYY-Q#(optional future endpoints)POST /api/actuals(optional, auth) → write inputs.
D1 Schema
See cloudflare-pages/_schema.sql.
Cron
Use the _worker.js scheduled handler to pull from a Sheet or simply finalize quarterly true-ups and append to history.
Quartz Embed
Use the snippet in quartz-embed/schedule-embed.html to render the schedule in content pages.